Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 101 additions & 48 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,15 @@ jobs:
target: armv7
- runner: ubuntu-22.04
target: s390x
- runner: ubuntu-22.04
target: ppc64
- runner: ubuntu-22.04
target: ppc64le
- runner: ubuntu-22.04
target: i686
- runner: ubuntu-22.04
target: riscv64gc-unknown-linux-gnu
arch: riscv64
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
Expand All @@ -45,16 +52,12 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: auto
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.13t
args: --release --out dist -i ${{ matrix.platform.interpreter || '3.8 3.13t 3.14t pypy3.9 pypy3.10 pypy3.11' }}
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: auto
- run: |
pip install twine --upgrade
twine check --strict dist/*
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -71,10 +74,10 @@ jobs:
pip install pytest
pytest
- name: pytest
if: ${{ !startsWith(matrix.platform.target, 'x86') && matrix.platform.target != 'ppc64' }}
if: ${{ !startsWith(matrix.platform.target, 'x86') && matrix.platform.target != 'ppc64' && matrix.platform.target != 'i686' }}
uses: uraimo/run-on-arch-action@v3
with:
arch: ${{ matrix.platform.target }}
arch: ${{ matrix.platform.arch || matrix.platform.target }}
distro: ubuntu22.04
githubToken: ${{ github.token }}
install: |
Expand Down Expand Up @@ -108,16 +111,12 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: false # ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: musllinux_1_2
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.13t
args: --release --out dist -i '3.8 3.13t 3.14t pypy3.9 pypy3.10 pypy3.11'
sccache: false # ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: musllinux_1_2
- run: |
pip install twine --upgrade
twine check --strict dist/*
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -157,6 +156,7 @@ jobs:
windows:
runs-on: ${{ matrix.platform.runner }}
strategy:
fail-fast: false
matrix:
platform:
- runner: windows-latest
Expand All @@ -165,43 +165,99 @@ jobs:
- runner: windows-latest
target: x86
architecture: x86
- runner: windows-11-arm
target: aarch64
architecture: arm64
steps:
- uses: actions/checkout@v5
- if: matrix.platform.target == 'x64'
id: pypy39
uses: actions/setup-python@v6
with:
python-version: pypy3.9
architecture: ${{ matrix.platform.architecture }}
- if: matrix.platform.target == 'x64'
id: pypy310
uses: actions/setup-python@v6
with:
python-version: pypy3.10
architecture: ${{ matrix.platform.architecture }}
- if: matrix.platform.target == 'x64'
id: pypy311
uses: actions/setup-python@v6
with:
python-version: pypy3.11
architecture: ${{ matrix.platform.architecture }}
- uses: actions/setup-python@v6
with:
python-version: 3.x
python-version: |
3.14t
3.13t
3.12
architecture: ${{ matrix.platform.architecture }}
- name: Install Rust
if: matrix.platform.target == 'aarch64'
run: |
# rustup is not installed in aarch64
if (-not (Get-Command rustup -ErrorAction SilentlyContinue)) {
Invoke-WebRequest -Uri "https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe" -OutFile "rustup-init.exe"
.\rustup-init.exe --default-toolchain stable -y
Remove-Item "rustup-init.exe"
"$env:USERPROFILE/.cargo/bin" | Out-File -FilePath "$env:GITHUB_PATH" -Append
}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist
args: --release --out dist -i ${{ '3.12 3.13t 3.14t' }}
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- if: matrix.platform.target != 'aarch64' # no 3.13t available for windows arm64
uses: actions/setup-python@v6
- if: matrix.platform.target == 'x64'
name: Build pypy wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i ${{ steps.pypy39.outputs.python-path }} ${{ steps.pypy310.outputs.python-path }} ${{ steps.pypy311.outputs.python-path }}
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- run: |
pip install twine --upgrade
twine check --strict dist/*
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
python-version: '3.13t'
architecture: ${{ matrix.platform.target }}
- if: matrix.platform.target != 'aarch64'
name: Build free-threaded wheels
name: wheels-windows-${{ matrix.platform.target }}
path: dist
- name: pytest
shell: bash
run: |
set -e
python3 -m venv .venv
source .venv/Scripts/activate
pip install reflink-copy --find-links dist --force-reinstall
pip install pytest
pytest

windows-arm:
runs-on: ${{ matrix.platform.runner }}
strategy:
fail-fast: false
matrix:
platform:
- runner: windows-11-arm
target: aarch64
architecture: arm64
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
id: cp314t
with:
python-version: "3.14t"
architecture: ${{ matrix.platform.architecture }}
- uses: actions/setup-python@v6
id: cp313t
with:
python-version: "3.13t"
architecture: ${{ matrix.platform.architecture }}
- uses: actions/setup-python@v6
id: cp312
with:
python-version: "3.12"
architecture: ${{ matrix.platform.architecture }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.13t
args: --release --out dist -i ${{ steps.cp312.outputs.python-path }} ${{ steps.cp313t.outputs.python-path }} ${{ steps.cp314t.outputs.python-path }}
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- run: |
pip install twine --upgrade
twine check --strict dist/*
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -235,14 +291,11 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.13t
args: --release --out dist -i '3.8 3.13t 3.14t pypy3.9 pypy3.10 pypy3.11'
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- run: |
pip install twine --upgrade
twine check --strict dist/*
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -277,7 +330,7 @@ jobs:
environment: release
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [linux, musllinux, windows, macos, sdist]
needs: [linux, musllinux, windows, windows-arm, macos, sdist]
permissions:
# Use to sign the release artifacts
id-token: write
Expand Down
Loading