diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ed86cfb..da3b869 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -99,7 +99,7 @@ jobs: pypy3.11 allow-prereleases: true - name: Build wheels - uses: PyO3/maturin-action@v1 + uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1 with: target: ${{ matrix.target }} args: --release --out dist --interpreter '3.9 3.10 3.11 3.12 3.13 3.13t pypy3.9 pypy3.10 pypy3.11' @@ -141,7 +141,7 @@ jobs: pypy3.11 allow-prereleases: true - name: Build wheels - uses: PyO3/maturin-action@v1 + uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1 with: target: ${{ matrix.target }} args: --release --out dist --interpreter '3.9 3.10 3.11 3.12 3.13 3.13t pypy3.9 pypy3.10 pypy3.11' @@ -179,7 +179,7 @@ jobs: allow-prereleases: true architecture: ${{ matrix.target }} - name: Build wheels - uses: PyO3/maturin-action@v1 + uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1 with: target: ${{ matrix.target }} args: --release --out dist --interpreter '3.9 3.10 3.11 3.12 3.13' --interpreter ${{ matrix.target == 'x64' && 'pypy3.9 pypy3.10' || '' }} @@ -190,6 +190,58 @@ jobs: name: dist-${{ github.job }}-${{ matrix.target }} path: dist + windows-arm: + needs: test + runs-on: windows-11-arm + + strategy: + fail-fast: false + matrix: + target: + - aarch64-pc-windows-msvc + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + # Install each python version seperatly so that the paths can be passed to maturin. (otherwise finds pre-installed x64 versions) + - uses: actions/setup-python@v5 + id: cp311 + with: + python-version: 3.11 + allow-prereleases: true + architecture: arm64 + - uses: actions/setup-python@v5 + id: cp312 + with: + python-version: 3.12 + allow-prereleases: true + architecture: arm64 + - uses: actions/setup-python@v5 + id: cp313 + with: + python-version: 3.13 + allow-prereleases: true + architecture: arm64 + # rust toolchain is not currently installed on windopws arm64 images: https://github.com/actions/partner-runner-images/issues/77 + - name: Setup rust + id: setup-rust + run: | + Invoke-WebRequest https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe -OutFile .\rustup-init.exe + .\rustup-init.exe -y + Add-Content $env:GITHUB_PATH "$env:USERPROFILE\.cargo\bin" + - name: Build wheels + uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1 + with: + target: ${{ matrix.target }} + args: --release --out dist --interpreter ${{ steps.cp311.outputs.python-path }} ${{ steps.cp312.outputs.python-path }} ${{ steps.cp313.outputs.python-path }} + sccache: ${{ github.ref_type != 'tag' }} # zizmor: ignore[cache-poisoning] + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: dist-${{ github.job }}-${{ matrix.target }} + path: dist + # free-threaded and normal builds share a site-packages folder on Windows so # we must build free-threaded separately windows-free-threaded: @@ -211,7 +263,7 @@ jobs: allow-prereleases: true architecture: ${{ matrix.target }} - name: Build wheels - uses: PyO3/maturin-action@v1 + uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1 with: target: ${{ matrix.target }} args: --release --out dist --interpreter '3.13t' @@ -249,7 +301,7 @@ jobs: pypy3.11 allow-prereleases: true - name: Build wheels - uses: PyO3/maturin-action@v1 + uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1 with: target: ${{ matrix.target }} args: --release --out dist --interpreter '3.9 3.10 3.11 3.12 3.13 3.13t pypy3.9 pypy3.10 pypy3.11' @@ -271,7 +323,7 @@ jobs: with: python-version: 3.13 - name: Build an sdist - uses: PyO3/maturin-action@v1 + uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1 with: command: sdist args: --out dist @@ -282,7 +334,8 @@ jobs: path: dist release: - needs: [manylinux, musllinux, windows, windows-free-threaded, macos] + needs: + [manylinux, musllinux, windows, windows-arm, windows-free-threaded, macos] runs-on: ubuntu-latest if: "startsWith(github.ref, 'refs/tags/')" environment: @@ -298,7 +351,7 @@ jobs: pattern: dist-* merge-multiple: true - name: Publish to PyPI - uses: PyO3/maturin-action@v1 + uses: PyO3/maturin-action@aef21716ff3dcae8a1c301d23ec3e4446972a6e3 # v1.49.1 with: command: upload args: --non-interactive --skip-existing *