Skip to content

Commit a608fb3

Browse files
authored
build: add support for Windows arm64 (#1972)
* add win-arm64 builds * add win-arm64 wheel builds * fix os-version * add win-arm64 tests * add minpy for win-arm64 * fix python-version * skip pypy for win-arm64 * add setup-rust step * fix conditional * fix shell for rust setup * increase number of expected distributions * remove extra lines * Remove changes to coverage.yml * Remove changes to testsuite.yml * Use cogapp to regen kit.yml
1 parent 2fe6225 commit a608fb3

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

.github/workflows/kit.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ env:
3939
PIP_DISABLE_PIP_VERSION_CHECK: 1
4040
# PYVERSIONS: changing the list of versions will change the number of
4141
# expected distributions.
42-
EXPECTED: 63
42+
EXPECTED: 67
4343

4444
permissions:
4545
contents: read
@@ -78,7 +78,7 @@ jobs:
7878
# os_archs = {
7979
# "ubuntu": ["x86_64", "i686", "aarch64"],
8080
# "macos": ["arm64", "x86_64"],
81-
# "windows": ["x86", "AMD64"],
81+
# "windows": ["x86", "AMD64", "ARM64"],
8282
# }
8383
# # PYVERSIONS. Available versions: https://pypi.org/project/cibuildwheel/
8484
# # PyPy versions are handled further below in the "pypy" step.
@@ -87,6 +87,7 @@ jobs:
8787
# # Some OS/arch combinations need overrides for the Python versions:
8888
# os_arch_pys = {
8989
# # ("macos", "arm64"): ["cp38", "cp39", "cp310", "cp311", "cp312"],
90+
# ("windows", "ARM64"): ["cp311", "cp312", "cp313"],
9091
# }
9192
#
9293
# #----- ^^^ ---------------------- ^^^ -----
@@ -102,6 +103,9 @@ jobs:
102103
# }
103104
# if the_os == "macos":
104105
# them["os-version"] = "13"
106+
# if the_os == "windows" and the_arch == "ARM64":
107+
# them["os-version"] = "11-arm"
108+
# them["minpy"] = "3.11"
105109
# if the_arch == "aarch64":
106110
# # https://github.com/pypa/cibuildwheel/issues/2257
107111
# them["os-version"] = "22.04-arm"
@@ -142,7 +146,10 @@ jobs:
142146
- {"os": "windows", "py": "cp311", "arch": "AMD64"}
143147
- {"os": "windows", "py": "cp312", "arch": "AMD64"}
144148
- {"os": "windows", "py": "cp313", "arch": "AMD64"}
145-
# [[[end]]] (checksum: 7c3758a4ca41df53d7ebcad68f12d0d0)
149+
- {"os": "windows", "py": "cp311", "arch": "ARM64", "os-version": "11-arm", "minpy": "3.11"}
150+
- {"os": "windows", "py": "cp312", "arch": "ARM64", "os-version": "11-arm", "minpy": "3.11"}
151+
- {"os": "windows", "py": "cp313", "arch": "ARM64", "os-version": "11-arm", "minpy": "3.11"}
152+
# [[[end]]] (checksum: ce8e88f33d7db22f1e21a767e3256a00)
146153
fail-fast: false
147154

148155
steps:
@@ -154,10 +161,20 @@ jobs:
154161
- name: "Install Python"
155162
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
156163
with:
157-
python-version: "3.9" # Minimum of PYVERSIONS
164+
python-version: "${{ matrix.minpy || '3.9' }}" # Minimum of PYVERSIONS
158165
cache: pip
159166
cache-dependency-path: 'requirements/*.pip'
160167

168+
# rust toolchain is not currently installed on windows arm64 images https://github.com/actions/partner-runner-images/issues/77
169+
- if: ${{ matrix.os-version == '11-arm' }}
170+
name: Setup rust
171+
id: setup-rust
172+
shell: pwsh
173+
run: |
174+
Invoke-WebRequest https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe -OutFile .\rustup-init.exe
175+
.\rustup-init.exe -y
176+
Add-Content $env:GITHUB_PATH "$env:USERPROFILE\.cargo\bin"
177+
161178
- name: "Install tools"
162179
run: |
163180
python -m pip install -r requirements/kit.pip

0 commit comments

Comments
 (0)