Skip to content
Merged
76 changes: 44 additions & 32 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 @@ -35,54 +35,66 @@ jobs:
target: aarch64
- runner: ubuntu-latest
target: armv7
- runner: ubuntu-latest
target: s390x
- runner: ubuntu-latest
target: ppc64le
- runner: ubuntu-latest
target: s390x
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
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --manifest-path pyreccaster/Cargo.toml --release --out dist --zig
args: --manifest-path pyreccaster/Cargo.toml --release --out dist --zig --compatibility pypi
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'
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- uses: actions/setup-python@v6
with:
python-version: 3.14t
architecture: ${{ matrix.platform.python_arch }}
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --manifest-path pyreccaster/Cargo.toml --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,21 +109,21 @@ jobs:
platform:
- runner: macos-latest
target: x86_64
- 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
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --manifest-path pyreccaster/Cargo.toml --release --out dist
args: --manifest-path pyreccaster/Cargo.toml --release --out dist --compatibility pypi
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/') || github.event_name == 'workflow_dispatch' }}
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/') || github.event_name == 'workflow_dispatch' }}
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 }}
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyreccaster/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyreccaster"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
authors = ["Aqeel AlShafei <aqeel.alshafei@stfc.ac.uk>"]
license = "MIT AND BSD-3-Clause"
Expand Down
Loading