Skip to content

Commit 99183d6

Browse files
henryiiimayeut
andauthored
ci: add Windows ARM (#2362)
* ci: add Windows ARM Signed-off-by: Henry Schreiner <[email protected]> * ci: install rust on Windows ARM Signed-off-by: Henry Schreiner <[email protected]> * ci: different action for rust Signed-off-by: Henry Schreiner <[email protected]> * ci: no sync required (avoid dev group) Signed-off-by: Henry Schreiner <[email protected]> * fix: expected wheels on Windows ARM64 * fix: skip python 3.8 on Windows ARM64 --------- Signed-off-by: Henry Schreiner <[email protected]> Co-authored-by: mayeut <[email protected]>
1 parent 95e3a65 commit 99183d6

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
runs-on: ${{ matrix.os }}
3737
strategy:
3838
matrix:
39-
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-15]
39+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-13, macos-15]
4040
python_version: ['3.13']
4141
include:
4242
- os: ubuntu-latest
@@ -70,7 +70,7 @@ jobs:
7070
7171
- name: Generate a sample project
7272
run: |
73-
uv run -m test.test_projects test.test_0_basic.basic_project sample_proj
73+
uv run --no-sync -m test.test_projects test.test_0_basic.basic_project sample_proj
7474
7575
- name: Run a sample build (GitHub Action)
7676
uses: ./
@@ -122,7 +122,7 @@ jobs:
122122

123123
- name: Test cibuildwheel
124124
run: |
125-
uv run bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}
125+
uv run --no-sync bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}
126126
127127
emulated-archs:
128128
name: Get qemu emulated architectures
@@ -141,7 +141,7 @@ jobs:
141141
- name: Get qemu emulated architectures
142142
id: archs
143143
run: |
144-
OUTPUT=$(uv run python -c "from json import dumps; from test.utils import EMULATED_ARCHS; print(dumps(EMULATED_ARCHS))")
144+
OUTPUT=$(uv run --no-sync python -c "from json import dumps; from test.utils import EMULATED_ARCHS; print(dumps(EMULATED_ARCHS))")
145145
echo "${OUTPUT}"
146146
echo "archs=${OUTPUT}" >> "$GITHUB_OUTPUT"
147147
@@ -166,7 +166,7 @@ jobs:
166166
uses: docker/setup-qemu-action@v3
167167

168168
- name: Run the emulation tests
169-
run: uv run pytest --run-emulation ${{ matrix.arch }} test/test_emulation.py
169+
run: uv run --no-sync pytest --run-emulation ${{ matrix.arch }} test/test_emulation.py
170170

171171
test-pyodide:
172172
name: Test cibuildwheel building Pyodide wheels
@@ -186,7 +186,7 @@ jobs:
186186

187187
- name: Generate a sample project
188188
run: |
189-
uv run -m test.test_projects test.test_0_basic.basic_project sample_proj
189+
uv run --no-sync -m test.test_projects test.test_0_basic.basic_project sample_proj
190190
191191
- name: Run a sample build (GitHub Action)
192192
uses: ./
@@ -198,6 +198,6 @@ jobs:
198198

199199
- name: Run tests with 'CIBW_PLATFORM' set to 'pyodide'
200200
run: |
201-
uv run ./bin/run_tests.py
201+
uv run --no-sync ./bin/run_tests.py
202202
env:
203203
CIBW_PLATFORM: pyodide

test/test_dependency_versions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import platform
12
import re
23
import textwrap
34
from pathlib import Path
@@ -56,6 +57,8 @@ def test_pinned_versions(tmp_path, python_version, build_frontend_env_nouv):
5657
pytest.skip("linux doesn't pin individual tool versions, it pins manylinux images instead")
5758
if python_version != "3.12" and utils.platform == "pyodide":
5859
pytest.skip(f"pyodide does not support Python {python_version}")
60+
if python_version == "3.8" and utils.platform == "windows" and platform.machine() == "ARM64":
61+
pytest.skip(f"Windows ARM64 does not support Python {python_version}")
5962

6063
project_dir = tmp_path / "project"
6164
project_with_expected_version_checks.generate(project_dir)

test/utils.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ def _expected_wheels(
245245
"cp313-cp313t",
246246
]
247247

248+
if machine_arch == "ARM64":
249+
# no CPython 3.8 on Windows ARM64
250+
python_abi_tags.pop(0)
251+
248252
if machine_arch in ["x86_64", "i686", "AMD64", "aarch64", "arm64"]:
249253
python_abi_tags += [
250254
"pp38-pypy38_pp73",
@@ -290,7 +294,11 @@ def _expected_wheels(
290294
)
291295

292296
elif platform == "windows":
293-
platform_tags = ["win_amd64"] if machine_arch == "AMD64" else ["win32"]
297+
platform_tags = {
298+
"AMD64": ["win_amd64"],
299+
"ARM64": ["win_arm64"],
300+
"x86": ["win32"],
301+
}.get(machine_arch, [])
294302

295303
elif platform == "macos":
296304
if python_abi_tag.startswith("pp"):

unit_test/oci_container_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"s390x": OCIPlatform.S390X,
3838
"aarch64": OCIPlatform.ARM64,
3939
"arm64": OCIPlatform.ARM64,
40+
"ARM64": OCIPlatform.ARM64,
4041
}[pm]
4142

4243
PODMAN = OCIContainerEngineConfig(name="podman")

0 commit comments

Comments
 (0)