ci: add Windows ARM (#2362)
* ci: add Windows ARM Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * ci: install rust on Windows ARM Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * ci: different action for rust Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * ci: no sync required (avoid dev group) Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * fix: expected wheels on Windows ARM64 * fix: skip python 3.8 on Windows ARM64 --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: mayeut <mayeut@users.noreply.github.com>
This commit is contained in:
co-authored by
mayeut
parent
95e3a6575f
commit
99183d68ac
@@ -36,7 +36,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-15]
|
||||
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-13, macos-15]
|
||||
python_version: ['3.13']
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
|
||||
- name: Generate a sample project
|
||||
run: |
|
||||
uv run -m test.test_projects test.test_0_basic.basic_project sample_proj
|
||||
uv run --no-sync -m test.test_projects test.test_0_basic.basic_project sample_proj
|
||||
|
||||
- name: Run a sample build (GitHub Action)
|
||||
uses: ./
|
||||
@@ -122,7 +122,7 @@ jobs:
|
||||
|
||||
- name: Test cibuildwheel
|
||||
run: |
|
||||
uv run bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}
|
||||
uv run --no-sync bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}
|
||||
|
||||
emulated-archs:
|
||||
name: Get qemu emulated architectures
|
||||
@@ -141,7 +141,7 @@ jobs:
|
||||
- name: Get qemu emulated architectures
|
||||
id: archs
|
||||
run: |
|
||||
OUTPUT=$(uv run python -c "from json import dumps; from test.utils import EMULATED_ARCHS; print(dumps(EMULATED_ARCHS))")
|
||||
OUTPUT=$(uv run --no-sync python -c "from json import dumps; from test.utils import EMULATED_ARCHS; print(dumps(EMULATED_ARCHS))")
|
||||
echo "${OUTPUT}"
|
||||
echo "archs=${OUTPUT}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
@@ -166,7 +166,7 @@ jobs:
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Run the emulation tests
|
||||
run: uv run pytest --run-emulation ${{ matrix.arch }} test/test_emulation.py
|
||||
run: uv run --no-sync pytest --run-emulation ${{ matrix.arch }} test/test_emulation.py
|
||||
|
||||
test-pyodide:
|
||||
name: Test cibuildwheel building Pyodide wheels
|
||||
@@ -186,7 +186,7 @@ jobs:
|
||||
|
||||
- name: Generate a sample project
|
||||
run: |
|
||||
uv run -m test.test_projects test.test_0_basic.basic_project sample_proj
|
||||
uv run --no-sync -m test.test_projects test.test_0_basic.basic_project sample_proj
|
||||
|
||||
- name: Run a sample build (GitHub Action)
|
||||
uses: ./
|
||||
@@ -198,6 +198,6 @@ jobs:
|
||||
|
||||
- name: Run tests with 'CIBW_PLATFORM' set to 'pyodide'
|
||||
run: |
|
||||
uv run ./bin/run_tests.py
|
||||
uv run --no-sync ./bin/run_tests.py
|
||||
env:
|
||||
CIBW_PLATFORM: pyodide
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import platform
|
||||
import re
|
||||
import textwrap
|
||||
from pathlib import Path
|
||||
@@ -56,6 +57,8 @@ def test_pinned_versions(tmp_path, python_version, build_frontend_env_nouv):
|
||||
pytest.skip("linux doesn't pin individual tool versions, it pins manylinux images instead")
|
||||
if python_version != "3.12" and utils.platform == "pyodide":
|
||||
pytest.skip(f"pyodide does not support Python {python_version}")
|
||||
if python_version == "3.8" and utils.platform == "windows" and platform.machine() == "ARM64":
|
||||
pytest.skip(f"Windows ARM64 does not support Python {python_version}")
|
||||
|
||||
project_dir = tmp_path / "project"
|
||||
project_with_expected_version_checks.generate(project_dir)
|
||||
|
||||
+9
-1
@@ -245,6 +245,10 @@ def _expected_wheels(
|
||||
"cp313-cp313t",
|
||||
]
|
||||
|
||||
if machine_arch == "ARM64":
|
||||
# no CPython 3.8 on Windows ARM64
|
||||
python_abi_tags.pop(0)
|
||||
|
||||
if machine_arch in ["x86_64", "i686", "AMD64", "aarch64", "arm64"]:
|
||||
python_abi_tags += [
|
||||
"pp38-pypy38_pp73",
|
||||
@@ -290,7 +294,11 @@ def _expected_wheels(
|
||||
)
|
||||
|
||||
elif platform == "windows":
|
||||
platform_tags = ["win_amd64"] if machine_arch == "AMD64" else ["win32"]
|
||||
platform_tags = {
|
||||
"AMD64": ["win_amd64"],
|
||||
"ARM64": ["win_arm64"],
|
||||
"x86": ["win32"],
|
||||
}.get(machine_arch, [])
|
||||
|
||||
elif platform == "macos":
|
||||
if python_abi_tag.startswith("pp"):
|
||||
|
||||
@@ -37,6 +37,7 @@ DEFAULT_OCI_PLATFORM = {
|
||||
"s390x": OCIPlatform.S390X,
|
||||
"aarch64": OCIPlatform.ARM64,
|
||||
"arm64": OCIPlatform.ARM64,
|
||||
"ARM64": OCIPlatform.ARM64,
|
||||
}[pm]
|
||||
|
||||
PODMAN = OCIContainerEngineConfig(name="podman")
|
||||
|
||||
Reference in New Issue
Block a user