Fix building on the main branch #182
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: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
paths-ignore: | |
- '**.rst' | |
- 'docs/**' | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**.rst' | |
- 'docs/**' | |
release: | |
types: | |
- published | |
env: | |
PIP_BREAK_SYSTEM_PACKAGES: 1 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build_wheels: | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: make requirements | |
- name: Set up QEMU # Needed to build aarch64 wheels | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- uses: pypa/[email protected] | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: wheelhouse/*.whl | |
overwrite: true | |
make_sdist: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
make requirements | |
python -m build --no-isolation --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: dist/*.tar.gz | |
overwrite: true | |
upload_all: | |
needs: [build_wheels, make_sdist] | |
runs-on: "ubuntu-latest" | |
environment: release | |
if: github.event_name == 'release' && github.event.action == 'published' | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 |