Skip to content

Commit 077390f

Browse files
authored
Add support for Windows arm64
1 parent 0eef2b3 commit 077390f

File tree

1 file changed

+96
-48
lines changed

1 file changed

+96
-48
lines changed

.github/workflows/CI.yml

Lines changed: 96 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,9 @@ jobs:
2828
# These jobs will set up the Python environments for the other jobs to use.
2929
setup-python-linux:
3030
name: Setup Python Environments (Linux)
31-
runs-on: ${{ matrix.platform.runner }}
31+
runs-on: ubuntu-latest
3232
strategy:
3333
matrix:
34-
platform:
35-
- runner: ubuntu-latest
36-
target: x86_64
37-
- runner: ubuntu-latest
38-
target: x86
39-
- runner: ubuntu-latest
40-
target: aarch64
41-
- runner: ubuntu-latest
42-
target: armv7
43-
- runner: ubuntu-latest
44-
target: s390x
45-
- runner: ubuntu-latest
46-
target: ppc64le
4734
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.9", "pypy3.10", "pypy3.11" ]
4835
steps:
4936
- uses: actions/checkout@v5
@@ -53,35 +40,56 @@ jobs:
5340
python-version: ${{ matrix.python-version }}
5441
allow-prereleases: true
5542

56-
setup-python-windows:
57-
name: Setup Python Environments (Windows)
58-
runs-on: ${{ matrix.platform.runner }}
43+
setup-python-windows-x64:
44+
name: Setup Python Environments (Windows-x64)
45+
runs-on: windows-latest
46+
strategy:
47+
matrix:
48+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
49+
steps:
50+
- uses: actions/checkout@v5
51+
- name: Set up Python
52+
uses: actions/setup-python@v6
53+
with:
54+
python-version: ${{ matrix.python-version }}
55+
architecture: x64
56+
allow-prereleases: true
57+
58+
setup-python-windows-x86:
59+
name: Setup Python Environments (Windows-x86)
60+
runs-on: windows-latest
61+
strategy:
62+
matrix:
63+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
64+
steps:
65+
- uses: actions/checkout@v5
66+
- name: Set up Python
67+
uses: actions/setup-python@v6
68+
with:
69+
python-version: ${{ matrix.python-version }}
70+
architecture: x86
71+
allow-prereleases: true
72+
73+
setup-python-windows-arm64:
74+
name: Setup Python Environments (Windows-arm64)
75+
runs-on: windows-11-arm
5976
strategy:
6077
matrix:
61-
platform:
62-
- runner: windows-latest
63-
target: x64 # 64-bit Python interpreter, note that 32-bit Python interpreter is not supported on Windows x86
64-
# Other Python versions need to be installed separately to build correctly
65-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
78+
python-version: ["3.11", "3.12", "3.13", "3.14"]
6679
steps:
6780
- uses: actions/checkout@v5
6881
- name: Set up Python
6982
uses: actions/setup-python@v6
7083
with:
7184
python-version: ${{ matrix.python-version }}
72-
architecture: ${{ matrix.platform.target }}
85+
architecture: arm64
7386
allow-prereleases: true
7487

7588
setup-python-macos:
7689
name: Setup Python Environments (macOS)
77-
runs-on: ${{ matrix.platform.runner }}
90+
runs-on: macos-latest
7891
strategy:
7992
matrix:
80-
platform:
81-
- runner: macos-latest
82-
target: x86_64
83-
- runner: macos-latest
84-
target: aarch64
8593
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.9", "pypy3.10", "pypy3.11" ]
8694
steps:
8795
- uses: actions/checkout@v5
@@ -145,14 +153,9 @@ jobs:
145153
name: wheels-musllinux-${{ matrix.target }}
146154
path: target/wheels
147155

148-
windows:
149-
runs-on: ${{ matrix.platform.runner }}
150-
needs: setup-python-windows
151-
strategy:
152-
matrix:
153-
platform:
154-
- runner: windows-latest
155-
target: x64
156+
windows-x64:
157+
runs-on: windows-latest
158+
needs: setup-python-windows-x64
156159
steps:
157160
- uses: actions/checkout@v5
158161

@@ -161,11 +164,10 @@ jobs:
161164
with:
162165
python-version: |
163166
3.8
164-
3.14
165167
pypy3.9
166168
pypy3.10
167169
pypy3.11
168-
architecture: ${{ matrix.platform.target }}
170+
architecture: x64
169171
allow-prereleases: true
170172

171173
- name: Set PyPy paths
@@ -193,7 +195,7 @@ jobs:
193195
- name: Build wheels for all Python versions
194196
uses: PyO3/maturin-action@v1
195197
with:
196-
target: ${{ matrix.platform.target }}
198+
target: x64
197199
args: |
198200
--release
199201
--out target/wheels
@@ -205,20 +207,66 @@ jobs:
205207
- name: Upload wheels
206208
uses: actions/upload-artifact@v4
207209
with:
208-
name: wheels-windows-${{ matrix.platform.target }}
210+
name: wheels-windows-x64
209211
path: target/wheels
210212

213+
windows-x86:
214+
needs: setup-python-windows-x86
215+
runs-on: windows-latest
216+
steps:
217+
- uses: actions/checkout@v5
218+
219+
- name: Install Python3.8
220+
uses: actions/setup-python@v6
221+
with:
222+
python-version: 3.8
223+
architecture: x86
224+
allow-prereleases: true
225+
- name: Build wheels for all Python versions
226+
uses: PyO3/maturin-action@v1
227+
with:
228+
target: x86
229+
args: |
230+
--release
231+
--out target/wheels
232+
-i python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 python3.14
233+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
234+
235+
- name: Upload wheels
236+
uses: actions/upload-artifact@v4
237+
with:
238+
name: wheels-windows-x86
239+
path: target/wheels
240+
241+
windows-arm64:
242+
runs-on: windows-11-arm
243+
needs: setup-python-windows-arm64
244+
steps:
245+
- uses: actions/checkout@v5
246+
- name: Build wheels for all Python versions
247+
uses: PyO3/maturin-action@v1
248+
with:
249+
target: aarch64-pc-windows-msvc
250+
args: |
251+
--release
252+
--out target/wheels
253+
-i python3.11 python3.12 python3.13 python3.14
254+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
255+
256+
- name: Upload wheels
257+
uses: actions/upload-artifact@v4
258+
with:
259+
name: wheels-windows-arm64
260+
path: target/wheels
261+
262+
211263

212264
macos:
213-
runs-on: ${{ matrix.runner }}
265+
runs-on: macos-latest
214266
needs: setup-python-macos
215267
strategy:
216268
matrix:
217-
include:
218-
- runner: macos-latest
219-
target: x86_64
220-
- runner: macos-latest
221-
target: aarch64
269+
target: [x86_64, aarch64]
222270
steps:
223271
- uses: actions/checkout@v5
224272

@@ -257,7 +305,7 @@ jobs:
257305
name: Release
258306
runs-on: ubuntu-latest
259307
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'}}
260-
needs: [linux, musllinux, windows, macos, sdist]
308+
needs: [linux, musllinux, windows-x64, windows-x86, windows-arm64, macos, sdist]
261309
permissions:
262310
# Use to sign the release artifacts
263311
id-token: write

0 commit comments

Comments
 (0)