From 2030a8f5ae436524633f45e7235d26d03c844bf2 Mon Sep 17 00:00:00 2001 From: Nicholas Frechette Date: Wed, 10 Sep 2025 21:25:19 -0400 Subject: [PATCH 1/3] chore(ci): add arm64ec to push CI --- .github/workflows/build_push.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build_push.yml b/.github/workflows/build_push.yml index 95ed0e6..2ff50ed 100644 --- a/.github/workflows/build_push.yml +++ b/.github/workflows/build_push.yml @@ -149,6 +149,14 @@ jobs: run: python3 make.py -ci -compiler vs2022 -config Release -cpu arm64 -build - name: Clean run: python3 make.py -clean_only + - name: Building (debug-arm64ec) + run: python3 make.py -ci -compiler vs2022 -config Debug -cpu arm64ec -build + - name: Clean + run: python3 make.py -clean_only + - name: Building (release-arm64ec) + run: python3 make.py -ci -compiler vs2022 -config Release -cpu arm64ec -build + - name: Clean + run: python3 make.py -clean_only - name: Building (debug-x64) with Clang run: python3 make.py -ci -compiler vs2022-clang -config Debug -cpu x64 -build - name: Running unit tests (debug-x64) with Clang From 9a19d1aaa6b033327d22d88a13f86d1a8779223e Mon Sep 17 00:00:00 2001 From: Nicholas Frechette Date: Fri, 12 Sep 2025 21:09:00 -0400 Subject: [PATCH 2/3] fix(ci): skip unit test detection when cross-compiling --- CMakeLists.txt | 1 + make.py | 8 ++++++++ tests/main_generic/CMakeLists.txt | 11 +++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a12fa75..093bca7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ include(CMakeCompiler) include(CMakePlatforms) set(CPU_INSTRUCTION_SET false CACHE STRING "CPU instruction set") +set(IS_CROSS_COMPILING false CACHE BOOL "Whether we are cross-compiling or not") if(CMAKE_CONFIGURATION_TYPES) set(CMAKE_CONFIGURATION_TYPES Debug Release) diff --git a/make.py b/make.py index 2ef6730..cb496bf 100644 --- a/make.py +++ b/make.py @@ -292,6 +292,10 @@ def do_generate_solution(build_dir, cmake_script_dir, args): cpu = args.cpu config = args.config + is_arm64_cpu = False + if platform.machine() == 'arm64' or platform.machine() == 'aarch64': + is_arm64_cpu = True + if compiler: set_compiler_env(compiler, args) @@ -299,6 +303,10 @@ def do_generate_solution(build_dir, cmake_script_dir, args): extra_switches.append('-DCPU_INSTRUCTION_SET:STRING={}'.format(cpu)) extra_switches.append('-DCMAKE_CXX_STANDARD:STRING={}'.format(args.cpp_version)) + if platform.system() == 'Windows' and not is_arm64_cpu: + if cpu == 'arm64' or cpu == 'arm64ec': + extra_switches.append('-DIS_CROSS_COMPILING:BOOL=true') + if platform.system() == 'Windows': if os.path.sep == '\\': # Native Windows diff --git a/tests/main_generic/CMakeLists.txt b/tests/main_generic/CMakeLists.txt index 0cc0c71..5000896 100644 --- a/tests/main_generic/CMakeLists.txt +++ b/tests/main_generic/CMakeLists.txt @@ -19,10 +19,13 @@ create_source_groups("${ALL_MAIN_SOURCE_FILES}" ${PROJECT_SOURCE_DIR}) add_executable(${PROJECT_NAME} ${ALL_TEST_SOURCE_FILES} ${ALL_MAIN_SOURCE_FILES}) -list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../../external/catch2/contrib") -include(CTest) -include(Catch) -catch_discover_tests(${PROJECT_NAME}) +if(NOT IS_CROSS_COMPILING) + # Don't attempt to detect unit tests if we are cross-compiling + list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../../external/catch2/contrib") + include(CTest) + include(Catch) + catch_discover_tests(${PROJECT_NAME}) +endif() setup_default_compiler_flags(${PROJECT_NAME}) From 34f50563ed5b5e8a475bb0d46b3b88e74d12cbe0 Mon Sep 17 00:00:00 2001 From: Nicholas Frechette Date: Fri, 12 Sep 2025 21:12:50 -0400 Subject: [PATCH 3/3] chore(ci): add arm64ec to pull request CI --- .github/workflows/build_pull_request.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build_pull_request.yml b/.github/workflows/build_pull_request.yml index 8a38184..17cf981 100644 --- a/.github/workflows/build_pull_request.yml +++ b/.github/workflows/build_pull_request.yml @@ -149,6 +149,14 @@ jobs: run: python3 make.py -ci -compiler vs2022 -config Release -cpu arm64 -build - name: Clean run: python3 make.py -clean_only + - name: Building (debug-arm64) + run: python3 make.py -ci -compiler vs2022 -config Debug -cpu arm64ec -build + - name: Clean + run: python3 make.py -clean_only + - name: Building (release-arm64) + run: python3 make.py -ci -compiler vs2022 -config Release -cpu arm64ec -build + - name: Clean + run: python3 make.py -clean_only - name: Building (debug-x64) with Clang run: python3 make.py -ci -compiler vs2022-clang -config Debug -cpu x64 -build - name: Running unit tests (debug-x64) with Clang