aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Fält <[email protected]>2025-01-22 10:45:29 +0200
committerCristián Maureira-Fredes <[email protected]>2025-03-15 10:58:55 +0100
commitd10ffbffa8c2d3500dd5f200ddbef406138e2a15 (patch)
treee0bafe386e96a3f8d65a7a7827dc8395eed1b91e
parent20fb997fe82b5a7d858b5eeb1b4e9cac19ca008d (diff)
CI: Enable Windows on Arm config
Change-Id: I66aa36d69b41afb86a6278304a231b97eabc5270 Reviewed-by: Cristian Maureira-Fredes <[email protected]>
-rw-r--r--build_scripts/platforms/windows_desktop.py6
-rw-r--r--coin/instructions/common_environment.yaml27
-rw-r--r--coin/instructions/execute_desktop_instructions.yaml14
-rw-r--r--coin/instructions/execute_test_instructions.yaml2
-rw-r--r--coin/instructions_utils.py11
-rw-r--r--coin/module_config.yaml3
-rw-r--r--create_wheels.py4
-rw-r--r--requirements.txt4
8 files changed, 58 insertions, 13 deletions
diff --git a/build_scripts/platforms/windows_desktop.py b/build_scripts/platforms/windows_desktop.py
index eaab7acb6..775095fa2 100644
--- a/build_scripts/platforms/windows_desktop.py
+++ b/build_scripts/platforms/windows_desktop.py
@@ -5,6 +5,7 @@ from __future__ import annotations
import functools
import os
import tempfile
+import platform
from pathlib import Path
@@ -252,6 +253,8 @@ def download_qt_dependency_dlls(_vars, destination_qt_dir, artifacts):
with tempfile.TemporaryDirectory() as temp_path:
redist_url = "https://download.qt.io/development_releases/prebuilt/vcredist/"
zip_file = "pyside_qt_deps_681_64_2022.7z"
+ if platform.machine() == "ARM64":
+ zip_file = "pyside_qt_deps_690_arm_2022.7z"
try:
download_and_extract_7z(redist_url + zip_file, temp_path)
except Exception as e:
@@ -444,5 +447,6 @@ def copy_qt_artifacts(pyside_build, destination_qt_dir, copy_pdbs, _vars):
destination_qt_dir,
_vars=_vars)
- if copy_clang:
+ if copy_clang or platform.machine() == "ARM64":
+ # Qt CI is using dynamic libclang with arm config.
pyside_build.prepare_standalone_clang(is_win=True)
diff --git a/coin/instructions/common_environment.yaml b/coin/instructions/common_environment.yaml
index ad3123f9f..adb67b56d 100644
--- a/coin/instructions/common_environment.yaml
+++ b/coin/instructions/common_environment.yaml
@@ -46,6 +46,33 @@ instructions:
- condition: property
property: host.os
equals_value: Windows
+ - condition: property
+ property: host.arch
+ not_equals_value: AARCH64
+ - type: EnvironmentVariable
+ variableName: PYTHON3_PATH
+ variableValue: "{{ index .Env \"PYTHON3.11.9-64_PATH\"}}"
+ enable_if:
+ condition: and
+ conditions:
+ - condition: property
+ property: host.os
+ equals_value: Windows
+ - condition: property
+ property: host.arch
+ equals_value: AARCH64
+ - type: EnvironmentVariable
+ variableName: TARGET_ARCHITECTURE
+ variableValue: arm64
+ enable_if:
+ condition: and
+ conditions:
+ - condition: property
+ property: target.arch
+ equals_value: AARCH64
+ - condition: property
+ property: host.os
+ equals_value: Windows
- type: EnvironmentVariable
variableName: TARGET_ARCHITECTURE
variableValue: amd64_x86
diff --git a/coin/instructions/execute_desktop_instructions.yaml b/coin/instructions/execute_desktop_instructions.yaml
index bece46b2b..9bd113a2e 100644
--- a/coin/instructions/execute_desktop_instructions.yaml
+++ b/coin/instructions/execute_desktop_instructions.yaml
@@ -47,6 +47,18 @@ instructions:
condition: property
property: host.os
equals_value: Windows
+ - type: EnvironmentVariable
+ variableName: PYSIDE_SIGNING_DIR
+ variableValue: "{{.AgentWorkingDir}}\\pyside\\{{.Env.TESTED_MODULE_COIN}}\\build\\qfpa-p3.11\\package_for_wheels"
+ enable_if:
+ condition: and
+ conditions:
+ - condition: property
+ property: host.os
+ equals_value: Windows
+ - condition: property
+ property: host.arch
+ equals_value: AARCH64
- type: ExecuteCommand
command: "{{.Env.interpreter}} -m pip install -r requirements-coin.txt --user"
maxTimeInSeconds: 14400
@@ -83,7 +95,7 @@ instructions:
userMessageOnFailure: >
Failed to install requirements-coin.txt dependencies on Windows
- type: ExecuteCommand
- command: "c:\\users\\qt\\MSVC.bat {{.Env.PYTHON3_PATH}}\\python.exe -u coin_build_instructions.py --os={{.Env.CI_OS}} {{.Env.CI_PACKAGING_FEATURE}} {{.Env.CI_USE_SCCACHE}} --instdir=\\Users\\qt\\work\\install --targetOs={{.Env.CI_OS}} --hostArch=X86_64 --targetArch={{.Env.CI_TARGET_ARCHITECTURE}} --phase=BUILD"
+ command: "c:\\users\\qt\\MSVC.bat {{.Env.PYTHON3_PATH}}\\python.exe -u coin_build_instructions.py --os={{.Env.CI_OS}} {{.Env.CI_PACKAGING_FEATURE}} {{.Env.CI_USE_SCCACHE}} --instdir=\\Users\\qt\\work\\install --targetOs={{.Env.CI_OS}} --hostArch={{.Env.HOST_ARCH_COIN}} --targetArch={{.Env.TARGET_ARCH_COIN}} --phase=BUILD"
maxTimeInSeconds: 14400
maxTimeBetweenOutput: 600
enable_if:
diff --git a/coin/instructions/execute_test_instructions.yaml b/coin/instructions/execute_test_instructions.yaml
index 7399ccb42..521503c39 100644
--- a/coin/instructions/execute_test_instructions.yaml
+++ b/coin/instructions/execute_test_instructions.yaml
@@ -86,7 +86,7 @@ instructions:
userMessageOnFailure: >
Failed to install requirements-coin.txt on Windows
- type: ExecuteCommand
- command: "c:\\users\\qt\\MSVC.bat {{.Env.PYTHON3_PATH}}\\python.exe -u coin_test_instructions.py --os={{.Env.CI_OS}} {{.Env.CI_PACKAGING_FEATURE}} --instdir=c:\\Users\\qt\\work\\install --targetOs={{.Env.CI_OS}} --hostArch=X86_64 --targetArch={{.Env.CI_TARGET_ARCHITECTURE}}"
+ command: "c:\\users\\qt\\MSVC.bat {{.Env.PYTHON3_PATH}}\\python.exe -u coin_test_instructions.py --os={{.Env.CI_OS}} {{.Env.CI_PACKAGING_FEATURE}} --instdir=c:\\Users\\qt\\work\\install --targetOs={{.Env.CI_OS}} --hostArch={{.Env.HOST_ARCH_COIN}} --targetArch={{.Env.TARGET_ARCH_COIN}}"
maxTimeInSeconds: 14400
maxTimeBetweenOutput: 600
enable_if:
diff --git a/coin/instructions_utils.py b/coin/instructions_utils.py
index 176a6d225..52c8211e0 100644
--- a/coin/instructions_utils.py
+++ b/coin/instructions_utils.py
@@ -144,7 +144,7 @@ def remove_variables(vars):
del os.environ[env_var]
-def setup_virtualenv(python, exe, env, pip, log):
+def setup_virtualenv(python, exe, env, pip, log, ci):
# Within Ubuntu 24.04 one can't install anything with pip to outside of
# virtual env. Trust that we already have proper virtualenv installed.
if os.environ.get("HOST_OSVERSION_COIN") != "ubuntu_24_04":
@@ -156,7 +156,10 @@ def setup_virtualenv(python, exe, env, pip, log):
env_path = Path(str(site.USER_BASE)) / "bin"
v_env = env_path / "virtualenv"
if sys.platform == "win32":
- env_path = os.path.join(site.USER_BASE, "Scripts")
+ if ci.TARGET_ARCH == "aarch64":
+ env_path = os.path.join(site.USER_BASE, "Python311-arm64", "Scripts")
+ else:
+ env_path = os.path.join(site.USER_BASE, "Scripts")
v_env = os.path.join(env_path, "virtualenv.exe")
try:
run_instruction([str(v_env), "--version"], "Using default virtualenv")
@@ -191,7 +194,7 @@ def call_setup(python_ver, ci, phase, log, buildnro=0):
python = Path(get_env_or_raise("PYTHON3_PATH")) / "python.exe"
if phase == "BUILD":
- setup_virtualenv(python, exe, env, pip, log)
+ setup_virtualenv(python, exe, env, pip, log, ci)
elif phase == "TEST":
if ci.HOST_OS == "MacOS" and ci.HOST_ARCH == "ARM64":
@@ -201,7 +204,7 @@ def call_setup(python_ver, ci, phase, log, buildnro=0):
[pip, "install", "-r", "requirements.txt"], "Failed to install dependencies"
)
else:
- setup_virtualenv(python, exe, env, pip, log)
+ setup_virtualenv(python, exe, env, pip, log, ci)
# Install distro to replace missing platform.linux_distribution() in python3.8
run_instruction([pip, "install", "distro"], "Failed to install distro")
diff --git a/coin/module_config.yaml b/coin/module_config.yaml
index 450365ca8..471c84035 100644
--- a/coin/module_config.yaml
+++ b/coin/module_config.yaml
@@ -25,9 +25,6 @@ accept_configuration:
- condition: property # Windows on Arm
property: target.arch
not_equals_value: ARM64
- - condition: property # Windows on Arm host build
- property: target.arch
- not_equals_value: AARCH64
- condition: property
property: features
not_contains_value: DebianPackaging
diff --git a/create_wheels.py b/create_wheels.py
index 32a89a6a7..55d02928b 100644
--- a/create_wheels.py
+++ b/create_wheels.py
@@ -149,8 +149,8 @@ def get_platform_tag() -> str:
# We know the CI builds universal2 wheels
_tag = f"macosx_{target}_universal2"
elif _os == "win32":
- win_arch = platform.architecture()[0]
- msvc_arch = "x86" if win_arch.startswith("32") else "amd64"
+ win_arch = platform.machine()
+ msvc_arch = "arm64" if win_arch.startswith("ARM64") else "amd64"
_tag = f"win_{msvc_arch}"
return _tag
diff --git a/requirements.txt b/requirements.txt
index 5f8eacc62..5078134fe 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -8,5 +8,7 @@ patchelf==0.17.2; sys_platform == 'linux'
# 2.0.2 is the last version that supports Python 3.9
numpy<=2.0.2; python_version <= '3.9'
numpy==2.1.3; python_version > '3.9'
-mypy[faster-cache]>=1.14.0
+mypy>=1.14.0; platform_machine == 'ARM64' and sys_platform == 'win32'
+mypy[faster-cache]>=1.14.0; platform_machine != 'ARM64' and sys_platform == 'win32'
+mypy[faster-cache]>=1.14.0; sys_platform != 'win32'
tomlkit==0.12.1