diff options
author | Brad King <brad.king@kitware.com> | 2022-06-13 12:46:28 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-06-13 15:04:24 -0400 |
commit | 7a21173b0eda59959b12d2e878e54f0b90d68b1d (patch) | |
tree | 1a2db1b3dae1b05ae8f562d8db039881599008a3 /.gitlab | |
parent | 06c6e76a126d357ce02b6736e4ded9e6fd9aa3ed (diff) | |
download | cmake-7a21173b0eda59959b12d2e878e54f0b90d68b1d.tar.gz |
gitlab-ci: Add job to build Windows arm64 binaries
Base it on the approach from commit 4c7c66dcf5 (gitlab-ci: Add jobs to
make Windows x86_64 and i386 packages, 2022-05-19). Leave out the
packaging and upload steps for now because they are only for the nightly
binaries, and will need a new release of CPack to pass the `arm64`
architecture to WiX.
Issue: #21902
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/artifacts.yml | 1 | ||||
-rw-r--r-- | .gitlab/ci/configure_windows_arm64_package.cmake | 16 | ||||
-rw-r--r-- | .gitlab/ci/download_qt.cmake | 10 | ||||
-rw-r--r-- | .gitlab/ci/download_qt_hashes.cmake | 4 | ||||
-rw-r--r-- | .gitlab/os-windows.yml | 23 |
5 files changed, 54 insertions, 0 deletions
diff --git a/.gitlab/artifacts.yml b/.gitlab/artifacts.yml index e0c82528f5..1b5384f2d8 100644 --- a/.gitlab/artifacts.yml +++ b/.gitlab/artifacts.yml @@ -105,6 +105,7 @@ - build/cmake-*-macos*-universal.* - build/cmake-*-windows-x86_64.* - build/cmake-*-windows-i386.* + - build/cmake-*-windows-arm64.* # Any source packages made. - build/cmake-*.tar.gz - build/cmake-*.zip diff --git a/.gitlab/ci/configure_windows_arm64_package.cmake b/.gitlab/ci/configure_windows_arm64_package.cmake new file mode 100644 index 0000000000..f3ce85330e --- /dev/null +++ b/.gitlab/ci/configure_windows_arm64_package.cmake @@ -0,0 +1,16 @@ +# CPack package file name component for this platform. +set(CPACK_SYSTEM_NAME "windows-arm64" CACHE STRING "") + +# Tell WiX to package for this architecture. +set(CPACK_WIX_ARCHITECTURE "arm64" CACHE STRING "") + +# Use APIs from at most Windows 7 +set(CMAKE_C_FLAGS "-D_WIN32_WINNT=0x0A00 -DNTDDI_VERSION=0x0A000008" CACHE STRING "") +set(CMAKE_CXX_FLAGS "-GR -EHsc -D_WIN32_WINNT=0x0A00 -DNTDDI_VERSION=0x0A000008" CACHE STRING "") +set(CMAKE_EXE_LINKER_FLAGS "-machine:arm64 -subsystem:console,6.02" CACHE STRING "") + +set(qt "$ENV{CI_PROJECT_DIR}/.gitlab/qt") +set(qt_host "$ENV{CI_PROJECT_DIR}/.gitlab/qt-host") +set(CMAKE_PREFIX_PATH "${qt};${qt_host}" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_package_common.cmake") diff --git a/.gitlab/ci/download_qt.cmake b/.gitlab/ci/download_qt.cmake index 3dba090a28..b02ceb0657 100644 --- a/.gitlab/ci/download_qt.cmake +++ b/.gitlab/ci/download_qt.cmake @@ -20,6 +20,11 @@ if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows.*package") elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows_i386_package") list(APPEND qt_files "qt-5.12.1-win-i386-msvc_v142-1.zip") set(qt_subdir "qt-5.12.1-win-i386-msvc_v142-1") + elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows_arm64_package") + list(APPEND qt_files "qt-6.3.0-win-arm64-msvc_v143-1.zip") + set(qt_subdir "qt-6.3.0-win-arm64-msvc_v143-1") + list(APPEND qt_files "qt-6.3.0-win-x86_64-msvc_v143-1.zip") + set(qt_host_subdir "qt-6.3.0-win-x86_64-msvc_v143-1") else () message(FATAL_ERROR "Unknown arch to use for Qt") endif() @@ -146,3 +151,8 @@ endif () file(RENAME ".gitlab/${qt_subdir}" ".gitlab/qt") +if(qt_host_subdir) + file(RENAME + ".gitlab/${qt_host_subdir}" + ".gitlab/qt-host") +endif() diff --git a/.gitlab/ci/download_qt_hashes.cmake b/.gitlab/ci/download_qt_hashes.cmake index d19d284eef..c4b0bd11a8 100644 --- a/.gitlab/ci/download_qt_hashes.cmake +++ b/.gitlab/ci/download_qt_hashes.cmake @@ -15,3 +15,7 @@ set("qt-5.15.2-macosx10.13-x86_64-arm64.tar.xz_hash" 7b9463a01c8beeee5bf8d01c70d set("qt-5.12.1-win-i386-msvc_v142-1.zip_hash" aa78711fdaa5d9b146bf7ddcf15983f9fbb3f995462f2d043f8cca74b40ddd11) set("qt-5.12.1-win-x86_64-msvc_v142-1.zip_hash" c2fc068b9dac40bb420e28e1ee15ce4f2ccfc866d767f3b99b6bb435b7c4f44b) + +set("qt-6.3.0-win-arm64-msvc_v143-1.zip_hash" 0950db703b0d305ff2855c69d8553e10036ebe5c65f95c4a850cf1f703410798) +set("qt-6.3.0-win-i386-msvc_v143-1.zip_hash" 52d68ff3b8a045222b59ebe12878b8597e97019c2ae930e846ec816ce6df18db) +set("qt-6.3.0-win-x86_64-msvc_v143-1.zip_hash" 3764a3076cf2331ec28bd88d6bddcab1578b1bb1329157bfe33ea02c2c63c6e1) diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml index d55035fb7d..b9b91fb5c9 100644 --- a/.gitlab/os-windows.yml +++ b/.gitlab/os-windows.yml @@ -43,6 +43,12 @@ VCVARSPLATFORM: "x86" VCVARSVERSION: "14.32.31326" +.windows_vcvarsall_vs2022_x64_arm64: + variables: + VCVARSALL: "${VS170COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat" + VCVARSPLATFORM: "x64_arm64" + VCVARSVERSION: "14.32.31326" + .windows_vs2022_x64_ninja: extends: - .windows_build_ninja @@ -75,6 +81,14 @@ variables: CMAKE_CONFIGURATION: windows_i386_package +.windows_arm64_package: + extends: + - .windows_package + - .windows_vcvarsall_vs2022_x64_arm64 + + variables: + CMAKE_CONFIGURATION: windows_arm64_package + ### External testing .windows_vs2022_x64: @@ -221,6 +235,15 @@ - msvc-19.32 - nonconcurrent +.windows_tags_nonconcurrent_vs2022_arm64: + tags: + - cmake # Since this is a bare runner, pin to a project. + - windows + - shell + - vs2022 + - msvc-19.32-arm64 + - nonconcurrent + .windows_tags_concurrent_vs2022: tags: - cmake # Since this is a bare runner, pin to a project. |