Switch extension building to setuptools #246
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Build | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v** | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-10.15, windows-2019] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Build wheel | |
uses: pypa/[email protected] | |
env: | |
CIBW_SKIP: cp36* cp37* pp* cp313* *musllinux* | |
CIBW_TEST_COMMAND: pytest --regression {package}/tests | |
CIBW_BEFORE_TEST: pip install pytest dials-data | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: ./wheelhouse/*.whl | |
upload_pypi: | |
needs: [build_wheels] | |
runs-on: ubuntu-latest | |
# upload to PyPI on every tag starting with 'v' | |
if: github.event_name == 'push' && startsWith(github.event.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@v4 | |
with: | |
name: sdist | |
path: dist | |
- uses: actions/download-artifact@v4 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@717ba43cfbb0387f6ce311b169a825772f54d295 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} |