diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 8d7a3c7..eae1675 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -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: @@ -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 @@ -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 @@ -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 @@ -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 }} diff --git a/Cargo.lock b/Cargo.lock index 1670c8b..dfc91c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -428,7 +428,7 @@ dependencies = [ [[package]] name = "pyreccaster" -version = "0.1.0" +version = "0.1.1" dependencies = [ "pyo3", "pyo3-async-runtimes", diff --git a/pyreccaster/Cargo.toml b/pyreccaster/Cargo.toml index 71f71f1..ee7d373 100644 --- a/pyreccaster/Cargo.toml +++ b/pyreccaster/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyreccaster" -version = "0.1.0" +version = "0.1.1" edition = "2021" authors = ["Aqeel AlShafei "] license = "MIT AND BSD-3-Clause"