--- /dev/null
+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/
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 = ""