From b0d16c7f7404bfa9979680b5bb4994441a6c0faa Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 11 Nov 2022 14:50:55 -0500 Subject: Tests: Fix CTest.UpdateGIT under repo-local defaultBranch config The default branch detection added by commit 26ec2e2b0c (Tests: Update CTest.UpdateGIT test for custom defaultBranch, 2020-12-02, v3.20.0-rc1~355^2) fails if the test is run inside a Git work tree whose `.git` directory configures a `defaultBranch` that is different from the global or system-wide value. Fix the detection to ignore the locally configured value so that we match the `git init` decision. --- Tests/CTestUpdateGIT.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in index a3ef4eb..7fddaa3 100644 --- a/Tests/CTestUpdateGIT.cmake.in +++ b/Tests/CTestUpdateGIT.cmake.in @@ -34,7 +34,7 @@ endif() # Adapt to the system default branch name. execute_process( - COMMAND ${GIT} config --get init.defaultBranch + COMMAND ${GIT} --git-dir= config --get init.defaultBranch RESULT_VARIABLE defaultBranchFailed OUTPUT_VARIABLE defaultBranch ERROR_VARIABLE defaultBranchError -- cgit v0.12 From 781303c0e263b2497829a8f7c2160d223faa8509 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 11 Nov 2022 11:40:37 -0500 Subject: ci: Factor out helper to load qt into environment on Windows --- .gitlab/ci/qt-env.ps1 | 4 ++++ .gitlab/os-windows.yml | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100755 .gitlab/ci/qt-env.ps1 diff --git a/.gitlab/ci/qt-env.ps1 b/.gitlab/ci/qt-env.ps1 new file mode 100755 index 0000000..c087a59 --- /dev/null +++ b/.gitlab/ci/qt-env.ps1 @@ -0,0 +1,4 @@ +$pwdpath = $pwd.Path +cmake -P .gitlab/ci/download_qt.cmake +Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\qt\bin;$env:PATH" +qmake -v diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml index 1979aa4..eb063f8 100644 --- a/.gitlab/os-windows.yml +++ b/.gitlab/os-windows.yml @@ -304,8 +304,7 @@ - . .gitlab/ci/ninja-env.ps1 - (& "$env:WIX\bin\light.exe" -help) | Select -First 1 - cmake --version - - cmake -P .gitlab/ci/download_qt.cmake - - Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\qt\bin;$env:PATH" + - . .gitlab/ci/qt-env.ps1 - cmake -P .gitlab/ci/download_python3.cmake - Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\python3;$env:PATH" - python --version -- cgit v0.12 From 1ccffcf0ea1b0d49fe723bc7d08083f5767c1e20 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 11 Nov 2022 11:43:56 -0500 Subject: ci: Factor out helper to load python into environment on Windows --- .gitlab/ci/python-env.ps1 | 4 ++++ .gitlab/os-windows.yml | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100755 .gitlab/ci/python-env.ps1 diff --git a/.gitlab/ci/python-env.ps1 b/.gitlab/ci/python-env.ps1 new file mode 100755 index 0000000..4e897d8 --- /dev/null +++ b/.gitlab/ci/python-env.ps1 @@ -0,0 +1,4 @@ +$pwdpath = $pwd.Path +cmake -P .gitlab/ci/download_python3.cmake +Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\python3;$env:PATH" +python --version diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml index eb063f8..ca46612 100644 --- a/.gitlab/os-windows.yml +++ b/.gitlab/os-windows.yml @@ -305,9 +305,7 @@ - (& "$env:WIX\bin\light.exe" -help) | Select -First 1 - cmake --version - . .gitlab/ci/qt-env.ps1 - - cmake -P .gitlab/ci/download_python3.cmake - - Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\python3;$env:PATH" - - python --version + - . .gitlab/ci/python-env.ps1 .cmake_build_windows: stage: build -- cgit v0.12 From 93a5d89b420975f18ce570fceb2110a0db306ae2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 10 Nov 2022 16:20:15 -0500 Subject: ci: Teach cmake download script on Windows to branch on host architecture --- .gitlab/ci/cmake.ps1 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/cmake.ps1 b/.gitlab/ci/cmake.ps1 index 98aeae3..ad2e460 100755 --- a/.gitlab/ci/cmake.ps1 +++ b/.gitlab/ci/cmake.ps1 @@ -1,8 +1,15 @@ $erroractionpreference = "stop" $version = "3.24.1" -$sha256sum = "C1B17431A16337D517F7BA78C7067B6F143A12686CB8087F3DD32F3FA45F5AAE" -$filename = "cmake-$version-windows-x86_64" + +if ("$env:PROCESSOR_ARCHITECTURE" -eq "AMD64") { + $sha256sum = "C1B17431A16337D517F7BA78C7067B6F143A12686CB8087F3DD32F3FA45F5AAE" + $platform = "windows-x86_64" +} else { + throw ('unknown PROCESSOR_ARCHITECTURE: ' + "$env:PROCESSOR_ARCHITECTURE") +} + +$filename = "cmake-$version-$platform" $tarball = "$filename.zip" $outdir = $pwd.Path -- cgit v0.12 From 61ebd7d083430ed55ad263b96e73efd91dcfa2ab Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 10 Nov 2022 16:20:50 -0500 Subject: ci: Download cmake on windows-arm64 --- .gitlab/ci/cmake.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab/ci/cmake.ps1 b/.gitlab/ci/cmake.ps1 index ad2e460..3efb67a 100755 --- a/.gitlab/ci/cmake.ps1 +++ b/.gitlab/ci/cmake.ps1 @@ -5,6 +5,9 @@ $version = "3.24.1" if ("$env:PROCESSOR_ARCHITECTURE" -eq "AMD64") { $sha256sum = "C1B17431A16337D517F7BA78C7067B6F143A12686CB8087F3DD32F3FA45F5AAE" $platform = "windows-x86_64" +} elseif ("$env:PROCESSOR_ARCHITECTURE" -eq "ARM64") { + $sha256sum = "D94683F3B0E63F6EF194C621194F6E26F3735EDA70750395E0F2BBEE4023FB95" + $platform = "windows-arm64" } else { throw ('unknown PROCESSOR_ARCHITECTURE: ' + "$env:PROCESSOR_ARCHITECTURE") } -- cgit v0.12 From 09c1b1db078022096d9b671ebd5ad6bb7a4b52fd Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 11 Nov 2022 12:03:23 -0500 Subject: gitlab-ci: Add windows-arm64 native jobs for Ninja and VS Add Windows ARM64 native CI jobs to build and test with Ninja, and to test with VS. Issue: #23624 --- .gitlab-ci.yml | 44 +++++++++++++++++++++- .gitlab/ci/configure_windows_arm64_vs2022.cmake | 1 + .../ci/configure_windows_arm64_vs2022_ninja.cmake | 7 ++++ .gitlab/ci/qt-env.ps1 | 14 +++++-- .gitlab/os-windows.yml | 42 +++++++++++++++++++++ 5 files changed, 103 insertions(+), 5 deletions(-) create mode 100644 .gitlab/ci/configure_windows_arm64_vs2022.cmake create mode 100644 .gitlab/ci/configure_windows_arm64_vs2022_ninja.cmake diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 83bd9ef..16c9e25 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -880,7 +880,7 @@ u:macos10.10-package: needs: - b:macos10.10-package -# Windows builds +# Windows x86_64 jobs b:windows-vs2022-x64-ninja: extends: @@ -1116,6 +1116,48 @@ t:windows-openwatcom1.9: variables: CMAKE_CI_JOB_NIGHTLY: "true" +# Windows arm64 jobs + +b:windows-arm64-vs2022-ninja: + extends: + - .windows_arm64_vs2022_ninja + - .cmake_build_windows + - .cmake_build_artifacts + - .windows_arm64_tags_nonconcurrent_vs2022 + - .run_manually + variables: + CMAKE_CI_JOB_NIGHTLY: "true" + +t:windows-arm64-vs2022-ninja: + extends: + - .windows_arm64_vs2022_ninja + - .cmake_test_windows + - .windows_arm64_tags_nonconcurrent_vs2022 + - .cmake_test_artifacts + - .run_dependent + dependencies: + - b:windows-arm64-vs2022-ninja + needs: + - b:windows-arm64-vs2022-ninja + variables: + CMAKE_CI_JOB_NIGHTLY: "true" + +t:windows-arm64-vs2022: + extends: + - .windows_arm64_vs2022 + - .cmake_test_windows_external + - .windows_arm64_tags_concurrent_vs2022 + - .cmake_junit_artifacts + - .run_dependent + dependencies: + - t:windows-arm64-vs2022-ninja + needs: + - t:windows-arm64-vs2022-ninja + variables: + CMAKE_CI_JOB_NIGHTLY: "true" + +# Windows package jobs + b:windows-x86_64-package: extends: - .windows_x86_64_package diff --git a/.gitlab/ci/configure_windows_arm64_vs2022.cmake b/.gitlab/ci/configure_windows_arm64_vs2022.cmake new file mode 100644 index 0000000..c7d41ea --- /dev/null +++ b/.gitlab/ci/configure_windows_arm64_vs2022.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_vs_common.cmake") diff --git a/.gitlab/ci/configure_windows_arm64_vs2022_ninja.cmake b/.gitlab/ci/configure_windows_arm64_vs2022_ninja.cmake new file mode 100644 index 0000000..722e009 --- /dev/null +++ b/.gitlab/ci/configure_windows_arm64_vs2022_ninja.cmake @@ -0,0 +1,7 @@ +# Qt host tools are not yet available natively on windows-arm64. +set(CMake_TEST_GUI "OFF" CACHE BOOL "") +set(BUILD_QtDialog "OFF" CACHE BOOL "") +set(CMAKE_PREFIX_PATH "" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_msvc_cxx_modules_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_vs_common_ninja.cmake") diff --git a/.gitlab/ci/qt-env.ps1 b/.gitlab/ci/qt-env.ps1 index c087a59..7eff55f 100755 --- a/.gitlab/ci/qt-env.ps1 +++ b/.gitlab/ci/qt-env.ps1 @@ -1,4 +1,10 @@ -$pwdpath = $pwd.Path -cmake -P .gitlab/ci/download_qt.cmake -Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\qt\bin;$env:PATH" -qmake -v +if ("$env:PROCESSOR_ARCHITECTURE" -eq "AMD64") { + $pwdpath = $pwd.Path + cmake -P .gitlab/ci/download_qt.cmake + Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\qt\bin;$env:PATH" + qmake -v +} elseif ("$env:PROCESSOR_ARCHITECTURE" -eq "ARM64") { + # Qt host tools are not yet available natively on windows-arm64. +} else { + throw ('unknown PROCESSOR_ARCHITECTURE: ' + "$env:PROCESSOR_ARCHITECTURE") +} diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml index ca46612..64b595e 100644 --- a/.gitlab/os-windows.yml +++ b/.gitlab/os-windows.yml @@ -49,6 +49,12 @@ VCVARSPLATFORM: "x64_arm64" VCVARSVERSION: "14.34.31933" +.windows_arm64_vcvarsall_vs2022: + variables: + VCVARSALL: "${VS170COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat" + VCVARSPLATFORM: "arm64" + VCVARSVERSION: "14.34.31933" + .windows_vs2022_x64_ninja: extends: - .windows_build_ninja @@ -57,6 +63,14 @@ variables: CMAKE_CONFIGURATION: windows_vs2022_x64_ninja +.windows_arm64_vs2022_ninja: + extends: + - .windows_build_ninja + - .windows_arm64_vcvarsall_vs2022 + + variables: + CMAKE_CONFIGURATION: windows_arm64_vs2022_ninja + .windows_package: extends: - .windows_build_ninja @@ -224,6 +238,16 @@ variables: CMAKE_CONFIGURATION: windows_openwatcom1.9 +.windows_arm64_vs2022: + extends: .windows + + variables: + CMAKE_CONFIGURATION: windows_arm64_vs2022 + CMAKE_GENERATOR: "Visual Studio 17 2022" + CMAKE_GENERATOR_PLATFORM: "ARM64" + CMAKE_GENERATOR_TOOLSET: "v143,version=14.34.31933" + CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true" + .mingw_osdn_io: extends: .windows @@ -292,6 +316,24 @@ - shell - concurrent +.windows_arm64_tags_nonconcurrent_vs2022: + tags: + - cmake # Since this is a bare runner, pin to a project. + - windows-arm64 + - shell + - vs2022 + - msvc-19.34 + - nonconcurrent + +.windows_arm64_tags_concurrent_vs2022: + tags: + - cmake # Since this is a bare runner, pin to a project. + - windows-arm64 + - shell + - vs2022 + - msvc-19.34 + - concurrent + ## Windows-specific scripts .before_script_windows: &before_script_windows -- cgit v0.12