Merge topic 'ci-windows'

3d4073b129 gitlab-ci: Try upstream ninja development branch in a Windows nightly job
bbb2664547 gitlab-ci: Add wix, cmake, and ninja to PATH incrementally on Windows
658009b6fe ci: Fix vcvarsall.ps1 environment variable lookup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6732
This commit is contained in:
Brad King
2021-11-16 14:04:29 +00:00
committed by Kitware Robot
5 changed files with 22 additions and 5 deletions

View File

@@ -742,6 +742,8 @@ test:windows-vs2022-x64-ninja:
- build:windows-vs2022-x64-ninja
needs:
- build:windows-vs2022-x64-ninja
variables:
CMAKE_CI_JOB_NIGHTLY_NINJA: "true"
test:windows-vs2022-x64:
extends:

9
.gitlab/ci/ninja-nightly.ps1 Executable file
View File

@@ -0,0 +1,9 @@
$erroractionpreference = "stop"
Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
Set-Location -Path ".gitlab"
git clone https://github.com/ninja-build/ninja.git ninja-src
cmake -S ninja-src -B ninja-src/build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
cmake --build ninja-src/build --target ninja
Move-Item -Path "ninja-src\build\ninja.exe" -Destination . -Force
Remove-Item "ninja-src" -Recurse -Force

View File

@@ -1,5 +1,10 @@
$erroractionpreference = "stop"
if ("$env:CMAKE_CI_JOB_NIGHTLY_NINJA" -eq "true" -And "$env:CMAKE_CI_NIGHTLY" -eq "true") {
& .gitlab/ci/ninja-nightly.ps1
exit $LASTEXITCODE
}
$version = "1.10.2"
$sha256sum = "BBDE850D247D2737C5764C927D1071CBB1F1957DCABDA4A130FA8547C12C695F"
$filename = "ninja-win"

View File

@@ -1,6 +1,6 @@
$erroractionpreference = "stop"
cmd /c "`"$env:VCVARSALL`" $VCVARSPLATFORM -vcvars_ver=$VCVARSVERSION & set" |
cmd /c "`"$env:VCVARSALL`" $env:VCVARSPLATFORM -vcvars_ver=$env:VCVARSVERSION & set" |
foreach {
if ($_ -match "=") {
$v = $_.split("=")

View File

@@ -151,13 +151,14 @@
## Windows-specific scripts
.before_script_windows: &before_script_windows
- Invoke-Expression -Command .gitlab/ci/wix.ps1
- Invoke-Expression -Command .gitlab/ci/cmake.ps1
- Invoke-Expression -Command .gitlab/ci/ninja.ps1
- $pwdpath = $pwd.Path
- powershell -File ".gitlab/ci/wix.ps1"
- Set-Item -Force -Path "env:WIX" -Value "$pwdpath\.gitlab\wix"
- powershell -File ".gitlab/ci/cmake.ps1"
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\cmake\bin;$env:PATH"
- powershell -File ".gitlab/ci/ninja.ps1"
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab;$env:PATH"
- (& "$env:WIX\bin\light.exe" -help) | Select -First 1
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab;$pwdpath\.gitlab\cmake\bin;$env:PATH"
- cmake --version
- ninja --version
- cmake -P .gitlab/ci/download_qt.cmake