Skip to content

Commit 8f3a281

Browse files
authored
Build Windows arm64 wheels (#85)
* add windows-arm step * add arm64-runner branch * remove conditional * use aarch64-pc-windows-msvc target * add windows-arm to release requirements * remove fork branch from workflow push trigger * use rust target in matrix * fix indentation * remove fork branch
1 parent 24d93c0 commit 8f3a281

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

.github/workflows/CI.yml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,45 @@ jobs:
7373
name: wheels-windows-${{ matrix.target }}
7474
path: dist
7575

76+
windows-arm:
77+
runs-on: windows-11-arm
78+
strategy:
79+
matrix:
80+
target: [aarch64-pc-windows-msvc]
81+
steps:
82+
- uses: actions/checkout@v3
83+
- uses: actions/setup-python@v4
84+
with:
85+
python-version: 3.12
86+
architecture: arm64
87+
# rust toolchain is not currently installed on windopws arm64 images https://github.com/actions/partner-runner-images/issues/77
88+
- name: Setup rust
89+
id: setup-rust
90+
run: |
91+
Invoke-WebRequest https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe -OutFile .\rustup-init.exe
92+
.\rustup-init.exe -y
93+
Add-Content $env:GITHUB_PATH "$env:USERPROFILE\.cargo\bin"
94+
- name: Build wheels
95+
uses: pyo3/maturin-action@v1
96+
with:
97+
target: ${{ matrix.target }}
98+
args: --release --out dist -i
99+
- name: Build free-threaded wheels
100+
uses: pyo3/maturin-action@v1
101+
with:
102+
target: ${{ matrix.target }}
103+
args: --release --out dist -i python3.13t
104+
- name: Install built wheel
105+
run: |
106+
pip install nh3 --no-index --find-links dist --force-reinstall
107+
pip install pytest
108+
cd tests && pytest
109+
- name: Upload wheels
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: wheels-windows-arm-${{ matrix.target }}
113+
path: dist
114+
76115
linux:
77116
runs-on: ubuntu-latest
78117
strategy:
@@ -278,7 +317,7 @@ jobs:
278317
runs-on: ubuntu-latest
279318
if: "startsWith(github.ref, 'refs/tags/')"
280319
needs:
281-
[macos, windows, linux, linux-cross, musllinux, musllinux-cross, sdist]
320+
[macos, windows, windows-arm, linux, linux-cross, musllinux, musllinux-cross, sdist]
282321
steps:
283322
- uses: actions/download-artifact@v4
284323
with:

0 commit comments

Comments
 (0)