Many wheel changes (#52) #277
Workflow file for this run
This file contains hidden or 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
| # This file is autogenerated by maturin v1.11.4 | |
| # To update, run | |
| # | |
| # maturin generate-ci github | |
| # | |
| name: Upload to PyPI | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| linux: | |
| runs-on: ${{ matrix.platform.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - runner: ubuntu-22.04 | |
| target: x86_64 | |
| python_version_min: '3.8' | |
| python_version_max: '3.14' | |
| - runner: ubuntu-22.04 | |
| target: x86 | |
| python_version_min: '3.8' | |
| python_version_max: '3.14' | |
| - runner: ubuntu-22.04 | |
| target: aarch64 | |
| python_version_min: '3.8' | |
| python_version_max: '3.14' | |
| - runner: ubuntu-22.04 | |
| target: armv7 | |
| python_version_min: '3.8' | |
| python_version_max: '3.14' | |
| - runner: ubuntu-22.04 | |
| target: s390x | |
| python_version_min: '3.8' | |
| python_version_max: '3.14' | |
| - runner: ubuntu-22.04 | |
| target: ppc64le | |
| python_version_min: '3.8' | |
| python_version_max: '3.14' | |
| steps: | |
| - uses: actions/checkout@main | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: | | |
| ${{ matrix.platform.python_version_min }} | |
| 3.14t | |
| pypy3.9 | |
| pypy3.10 | |
| pypy3.11 | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist -i python${{ matrix.platform.python_version_min }} python3.14t pypy3.9 pypy3.10 pypy3.11 | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| manylinux: auto | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: wheels-linux-${{ matrix.platform.target }} | |
| path: dist | |
| if-no-files-found: error | |
| # Test the built wheels are installable in the min and max Python | |
| # versions we are about. | |
| # We do this by installing the Python version in a venv using uv, | |
| # installing the built wheel into the venv and running some simple | |
| # command like printing the mapfile_parser version from within Python. | |
| # We can only test the wheels that matches the architecture of the runner | |
| # so we hope the other built wheels will just work, hopefully. | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| if: ${{ matrix.platform.target == 'x86_64' }} | |
| - name: Test wheels with min version (${{ matrix.platform.python_version_min }}) | |
| if: ${{ matrix.platform.target == 'x86_64' }} | |
| # Check the built wheel is installable on the oldest Python supported | |
| run: | | |
| .github/scripts/ci_check_wheel.sh ${{ matrix.platform.python_version_min }} abi3 | |
| - name: Test wheels with max version (${{ matrix.platform.python_version_max }}) | |
| if: ${{ matrix.platform.target == 'x86_64' }} | |
| # Check the built wheel is installable on the newest Python we know of | |
| run: | | |
| .github/scripts/ci_check_wheel.sh ${{ matrix.platform.python_version_max }} abi3 --managed-python | |
| - name: Test free threaded wheels | |
| if: ${{ matrix.platform.target == 'x86_64' }} | |
| run: | | |
| .github/scripts/ci_check_wheel.sh 3.14t cp314t --managed-python | |
| - name: Test pypy wheels | |
| if: ${{ matrix.platform.target == 'x86_64' }} | |
| run: | | |
| .github/scripts/ci_check_wheel.sh pypy3.9 pypy39 --managed-python | |
| .github/scripts/ci_check_wheel.sh pypy3.10 pypy310 --managed-python | |
| .github/scripts/ci_check_wheel.sh pypy3.11 pypy311 --managed-python | |
| musllinux: | |
| runs-on: ${{ matrix.platform.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - runner: ubuntu-22.04 | |
| target: x86_64 | |
| python_version_min: '3.8' | |
| - runner: ubuntu-22.04 | |
| target: x86 | |
| python_version_min: '3.8' | |
| - runner: ubuntu-22.04 | |
| target: aarch64 | |
| python_version_min: '3.8' | |
| - runner: ubuntu-22.04 | |
| target: armv7 | |
| python_version_min: '3.8' | |
| steps: | |
| - uses: actions/checkout@main | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: | | |
| ${{ matrix.platform.python_version_min }} | |
| 3.14t | |
| pypy3.9 | |
| pypy3.10 | |
| pypy3.11 | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist -i python${{ matrix.platform.python_version_min }} python3.14t pypy3.9 pypy3.10 pypy3.11 | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| manylinux: musllinux_1_2 | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: wheels-musllinux-${{ matrix.platform.target }} | |
| path: dist | |
| if-no-files-found: error | |
| # We can't test musllinux wheels on manylinux runners | |
| windows: | |
| runs-on: ${{ matrix.platform.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - runner: windows-latest | |
| target: x64 | |
| python_arch: x64 | |
| python_version_min: '3.8' | |
| python_version_max: '3.14' | |
| - runner: windows-latest | |
| target: x86 | |
| python_arch: x86 | |
| python_version_min: '3.8' | |
| python_version_max: '3.14' | |
| steps: | |
| - uses: actions/checkout@main | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: | | |
| ${{ matrix.platform.python_version_min }} | |
| 3.14t | |
| architecture: ${{ matrix.platform.python_arch }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist -i python${{ matrix.platform.python_version_min }} python3.14t | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: wheels-windows-${{ matrix.platform.target }} | |
| path: dist | |
| if-no-files-found: error | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| if: ${{ matrix.platform.target == 'x64' }} | |
| - name: Test wheels with min version (${{ matrix.platform.python_version_min }}) | |
| if: ${{ matrix.platform.target == 'x64' }} | |
| # Check the built wheel is installable on the oldest Python supported | |
| run: | | |
| .github/scripts/ci_check_wheel.ps1 ${{ matrix.platform.python_version_min }} abi3 | |
| - name: Test wheels with max version (${{ matrix.platform.python_version_max }}) | |
| if: ${{ matrix.platform.target == 'x64' }} | |
| run: | | |
| .github/scripts/ci_check_wheel.ps1 ${{ matrix.platform.python_version_max }} abi3 --managed-python | |
| - name: Test free threaded wheels | |
| if: ${{ matrix.platform.target == 'x64' }} | |
| run: | | |
| .github/scripts/ci_check_wheel.sh 3.14t cp314t --managed-python | |
| # Windows ARM is kinda broken, for some reason it can't setup Python 3.14t, | |
| # so I gave up trying, hopefully nobody will be using ARM Windows with 3.14t | |
| windows_arm: | |
| runs-on: ${{ matrix.platform.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - runner: windows-11-arm | |
| target: aarch64 | |
| python_arch: arm64 | |
| python_version_min: '3.11' | |
| python_version_max: '3.14' | |
| steps: | |
| - uses: actions/checkout@main | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: | | |
| ${{ matrix.platform.python_version_min }} | |
| architecture: ${{ matrix.platform.python_arch }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist -i python${{ matrix.platform.python_version_min }} | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: wheels-windows-${{ matrix.platform.target }} | |
| path: dist | |
| if-no-files-found: error | |
| - name: Test wheels with min version (${{ matrix.platform.python_version_min }}) | |
| if: ${{ matrix.platform.target == 'x64' }} | |
| # Check the built wheel is installable on the oldest Python supported | |
| run: | | |
| .github/scripts/ci_check_wheel.ps1 ${{ matrix.platform.python_version_min }} abi3 | |
| - name: Test wheels with max version (${{ matrix.platform.python_version_max }}) | |
| if: ${{ matrix.platform.target == 'x64' }} | |
| run: | | |
| .github/scripts/ci_check_wheel.ps1 ${{ matrix.platform.python_version_max }} abi3 --managed-python | |
| macos: | |
| runs-on: ${{ matrix.platform.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - runner: macos-15-intel | |
| target: x86_64 | |
| python_version_min: '3.8' | |
| python_version_max: '3.14' | |
| - runner: macos-latest | |
| target: aarch64 | |
| python_version_min: '3.8' | |
| python_version_max: '3.14' | |
| steps: | |
| - uses: actions/checkout@main | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: | | |
| ${{ matrix.platform.python_version_min }} | |
| 3.14t | |
| pypy3.9 | |
| pypy3.10 | |
| pypy3.11 | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist -i python${{ matrix.platform.python_version_min }} python3.14t pypy3.9 pypy3.10 pypy3.11 | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: wheels-macos-${{ matrix.platform.target }} | |
| path: dist | |
| if-no-files-found: error | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Test wheels with min version (${{ matrix.platform.python_version_min }}) | |
| # Check the built wheel is installable on the oldest Python supported | |
| run: | | |
| .github/scripts/ci_check_wheel.sh ${{ matrix.platform.python_version_min }} abi3 | |
| - name: Test wheels with max version (${{ matrix.platform.python_version_max }}) | |
| # Check the built wheel is installable on the oldest Python supported | |
| run: | | |
| .github/scripts/ci_check_wheel.sh ${{ matrix.platform.python_version_max }} abi3 --managed-python | |
| - name: Test free threaded wheels | |
| run: | | |
| .github/scripts/ci_check_wheel.sh 3.14t cp314t --managed-python | |
| - name: Test pypy wheels | |
| run: | | |
| .github/scripts/ci_check_wheel.sh pypy3.9 pypy39 --managed-python | |
| .github/scripts/ci_check_wheel.sh pypy3.10 pypy310 --managed-python | |
| .github/scripts/ci_check_wheel.sh pypy3.11 pypy311 --managed-python | |
| sdist: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@main | |
| - name: Build sdist | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| command: sdist | |
| args: --out dist | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: wheels-sdist | |
| path: dist | |
| if-no-files-found: error | |
| check_clippy_python_bindings: | |
| name: Check clippy for Python bindings | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout reposistory | |
| uses: actions/checkout@main | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - name: Setup clippy | |
| run: rustup component add clippy | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --features python_bindings -- -D warnings | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| needs: [linux, musllinux, windows, windows_arm, macos, sdist, check_clippy_python_bindings] | |
| permissions: | |
| # Use to sign the release artifacts | |
| id-token: write | |
| # Used to upload release artifacts | |
| contents: write | |
| # Used to generate artifact attestation | |
| attestations: write | |
| steps: | |
| - uses: actions/download-artifact@v6 | |
| - name: Generate artifact attestation | |
| uses: actions/attest-build-provenance@v3 | |
| with: | |
| subject-path: 'wheels-*/*' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Publish to PyPI | |
| run: uv publish 'wheels-*/*' | |
| env: | |
| UV_PUBLISH_TOKEN: ${{ secrets.PYPI_PASSWORD }} |