]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Added basic cibuildwheel configuration and github actions file
authorTrevor Gross <tgross@intrepidcs.com>
Fri, 6 May 2022 06:23:39 +0000 (02:23 -0400)
committerTrevor Gross <tgross@intrepidcs.com>
Fri, 6 May 2022 07:16:29 +0000 (03:16 -0400)
.github/workflows/cibuildwheels.yaml [new file with mode: 0644]
pyproject.toml

diff --git a/.github/workflows/cibuildwheels.yaml b/.github/workflows/cibuildwheels.yaml
new file mode 100644 (file)
index 0000000..07926ef
--- /dev/null
@@ -0,0 +1,65 @@
+name: Build wheels
+
+on:
+  pull_request:
+    branches:
+      - main
+    # paths-ignore:
+    #   - "examples/**"
+    #   - "doc/**"
+      
+jobs:
+  build_wheels:
+    name: Build wheels on ${{ matrix.os }}
+    # TODO: Add logic to run/ignore on [wheels-build] or [wheels-skip]
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        os: [ubuntu-20.04, windows-2019, macos-10.15]
+
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Build wheels
+        uses: pypa/cibuildwheel@v2.5.0
+        # to supply options, put them in 'env', like:
+        # env:
+        #   CIBW_SOME_OPTION: value
+
+      - uses: actions/upload-artifact@v2
+        with:
+          path: ./wheelhouse/*.whl
+
+
+  build_sdist:
+    name: Build source distribution
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Build sdist
+        run: pipx run build --sdist
+
+      - uses: actions/upload-artifact@v2
+        with:
+          path: dist/*.tar.gz
+
+
+  # upload_pypi:
+  #   needs: [build_wheels, build_sdist]
+  #   runs-on: ubuntu-latest
+  #   # upload to PyPI on every tag starting with 'v'
+  #   if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
+  #   # alternatively, to publish when a GitHub Release is created, use the following rule:
+  #   # if: github.event_name == 'release' && github.event.action == 'published'
+  #   steps:
+  #     - uses: actions/download-artifact@v2
+  #       with:
+  #         name: artifact
+  #         path: dist
+
+  #     - uses: pypa/gh-action-pypi-publish@v1.4.2
+  #       with:
+  #         user: __token__
+  #         password: ${{ secrets.pypi_password }}
+  #         # To test: repository_url: https://test.pypi.org/legacy/
index f8498fde94e7f8d072179a782908da31582dcd21..14d8cb4f9149acc75fde8fcb310eb802b26aee40 100644 (file)
@@ -90,3 +90,13 @@ module = [
 ignore_errors = true
 warn_unused_ignores = false
 
+
+[tool.cibuildwheel]
+before-test = ""
+test-requires = "pytest pytest-xdist"
+# Need to change root directory, otherisw the plugin won't find setup.cfg
+test-command = "(cd {project}; pytest --trace-config;  pytest -n2 -q test --nomemory --notimingintensive)"
+
+build = "*"
+skip = "cp36-* pp*"
+test-skip = ""