Skip to content
70 changes: 41 additions & 29 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This file is autogenerated by maturin v1.7.4
# This file is autogenerated by maturin v1.12.0
# To update, run
#
# maturin generate-ci github --platform manylinux windows macos --zig -o ../.github/workflows/maturin.yml
#
name: PyO3 build and publish to PyPi
name: CI

on:
push:
Expand Down Expand Up @@ -40,8 +40,8 @@ jobs:
- runner: ubuntu-latest
target: ppc64le
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Build wheels
Expand All @@ -52,37 +52,49 @@ jobs:
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist

windows:
runs-on: ${{ matrix.platform.runner }}
defaults:
run:
working-directory: ./pyreccaster
strategy:
matrix:
platform:
- runner: windows-latest
target: x64
python_arch: x64
- runner: windows-latest
target: x86
python_arch: x86
- runner: windows-11-arm
target: aarch64
python_arch: arm64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
architecture: ${{ matrix.platform.target }}
python-version: 3.13
architecture: ${{ matrix.platform.python_arch }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --manifest-path pyreccaster/Cargo.toml --release --out dist
sccache: 'true'
args: --release --out dist
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- uses: actions/setup-python@v6
with:
python-version: 3.14t
Comment thread
jacomago marked this conversation as resolved.
architecture: ${{ matrix.platform.python_arch }}
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.14t
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: wheels-windows-${{ matrix.platform.target }}
path: dist
Expand All @@ -97,11 +109,11 @@ jobs:
platform:
- runner: macos-latest
target: x86_64
Comment thread
jacomago marked this conversation as resolved.
- runner: macos-14
- runner: macos-latest
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Build wheels
Expand All @@ -111,7 +123,7 @@ jobs:
args: --manifest-path pyreccaster/Cargo.toml --release --out dist
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist
Expand All @@ -122,14 +134,14 @@ jobs:
run:
working-directory: ./pyreccaster
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --manifest-path pyreccaster/Cargo.toml --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: wheels-sdist
path: dist
Expand All @@ -147,16 +159,16 @@ jobs:
# Used to generate artifact attestation
attestations: write
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v6
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
uses: actions/attest-build-provenance@v3
with:
subject-path: 'wheels-*/*'
- name: Install uv
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: astral-sh/setup-uv@v7
- name: Publish to PyPI
if: "startsWith(github.ref, 'refs/tags/')"
uses: PyO3/maturin-action@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: uv publish 'wheels-*/*'
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
Loading