summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-09-13 13:45:04 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-09-13 13:45:13 (GMT)
commitfd3036268132a0a31e7b445f718da5c68e20ece3 (patch)
treeffb6a6f6282a93cc5977ac3aee6cb06f58a88a88
parent168e4491de07bc83f08d2fc09d627aa011847699 (diff)
parent94b27ccc361973cbbb19c715d702369a82efc700 (diff)
downloadCMake-fd3036268132a0a31e7b445f718da5c68e20ece3.zip
CMake-fd3036268132a0a31e7b445f718da5c68e20ece3.tar.gz
CMake-fd3036268132a0a31e7b445f718da5c68e20ece3.tar.bz2
Merge topic 'ci-pwsh-cleanup'
94b27ccc36 ci: add support for gitlab-runner 'shell = pwsh' executor de32c8ddbe ci: start every windows job with custom environment script 906b1a0bc4 ci: allow powershell variables assigned in env scripts to persist Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !7667
-rwxr-xr-x.gitlab/ci/env.ps13
-rwxr-xr-x.gitlab/ci/env_windows_vs2022_x64_ninja.ps12
-rwxr-xr-x.gitlab/ci/env_windows_vs2022_x64_ninja_multi.ps14
-rwxr-xr-x.gitlab/ci/ispc-env.ps12
-rw-r--r--.gitlab/os-windows.yml18
5 files changed, 18 insertions, 11 deletions
diff --git a/.gitlab/ci/env.ps1 b/.gitlab/ci/env.ps1
index e24bc37..72a8cb8 100755
--- a/.gitlab/ci/env.ps1
+++ b/.gitlab/ci/env.ps1
@@ -1,3 +1,4 @@
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().MainModule.FileName
if (Test-Path -Path ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1" -PathType Leaf) {
- Invoke-Expression ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1"
+ . ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1"
}
diff --git a/.gitlab/ci/env_windows_vs2022_x64_ninja.ps1 b/.gitlab/ci/env_windows_vs2022_x64_ninja.ps1
index f8a86c4..a96658d 100755
--- a/.gitlab/ci/env_windows_vs2022_x64_ninja.ps1
+++ b/.gitlab/ci/env_windows_vs2022_x64_ninja.ps1
@@ -1,3 +1,3 @@
if ("$env:CMAKE_CI_NIGHTLY" -eq "true") {
- Invoke-Expression ".gitlab/ci/ispc-env.ps1"
+ . ".gitlab/ci/ispc-env.ps1"
}
diff --git a/.gitlab/ci/env_windows_vs2022_x64_ninja_multi.ps1 b/.gitlab/ci/env_windows_vs2022_x64_ninja_multi.ps1
index e8d242c..e5f538a 100755
--- a/.gitlab/ci/env_windows_vs2022_x64_ninja_multi.ps1
+++ b/.gitlab/ci/env_windows_vs2022_x64_ninja_multi.ps1
@@ -1,9 +1,9 @@
if ("$env:CMAKE_CI_NIGHTLY" -eq "true") {
- Invoke-Expression -Command ".gitlab/ci/ispc-env.ps1"
+ . ".gitlab/ci/ispc-env.ps1"
}
$pwdpath = $pwd.Path
-powershell -File ".gitlab/ci/ninja.ps1"
+& "$pwsh" -File ".gitlab/ci/ninja.ps1"
Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab;$env:PATH"
ninja --version
diff --git a/.gitlab/ci/ispc-env.ps1 b/.gitlab/ci/ispc-env.ps1
index 1baea31..816c485 100755
--- a/.gitlab/ci/ispc-env.ps1
+++ b/.gitlab/ci/ispc-env.ps1
@@ -1,4 +1,4 @@
$pwdpath = $pwd.Path
-powershell -File ".gitlab/ci/ispc.ps1"
+& "$pwsh" -File ".gitlab/ci/ispc.ps1"
Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\ispc\bin;$env:PATH"
ispc --version
diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml
index 282cf1e..5c6be11 100644
--- a/.gitlab/os-windows.yml
+++ b/.gitlab/os-windows.yml
@@ -293,13 +293,13 @@
## Windows-specific scripts
.before_script_windows: &before_script_windows
- - Invoke-Expression -Command .gitlab/ci/env.ps1
+ - . .gitlab/ci/env.ps1
- $pwdpath = $pwd.Path
- - powershell -File ".gitlab/ci/wix.ps1"
+ - (& "$pwsh" -File ".gitlab/ci/wix.ps1")
- Set-Item -Force -Path "env:WIX" -Value "$pwdpath\.gitlab\wix"
- - powershell -File ".gitlab/ci/cmake.ps1"
+ - (& "$pwsh" -File ".gitlab/ci/cmake.ps1")
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\cmake\bin;$env:PATH"
- - powershell -File ".gitlab/ci/ninja.ps1"
+ - (& "$pwsh" -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
- cmake --version
@@ -352,7 +352,7 @@
stage: test-ext
script:
- - Invoke-Expression -Command .gitlab/ci/env.ps1
+ - . .gitlab/ci/env.ps1
- build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake
interruptible: true
@@ -361,6 +361,7 @@
stage: test-ext
script:
+ - . .gitlab/ci/env.ps1
- Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
- build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake
@@ -370,6 +371,7 @@
stage: test-ext
script:
+ - . .gitlab/ci/env.ps1
- Invoke-Expression -Command .gitlab/ci/jom.ps1
- $pwdpath = $pwd.Path
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\jom;$env:PATH"
@@ -382,6 +384,7 @@
stage: test-ext
script:
+ - . .gitlab/ci/env.ps1
- Invoke-Expression -Command .gitlab/ci/borland.ps1
- $pwdpath = $pwd.Path
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\bcc\bin;$env:PATH"
@@ -393,8 +396,9 @@
stage: test-ext
script:
+ - . .gitlab/ci/env.ps1
- $pwdpath = $pwd.Path
- - powershell -File ".gitlab/ci/ninja.ps1"
+ - (& "$pwsh" -File ".gitlab/ci/ninja.ps1")
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab;$env:PATH"
- Invoke-Expression -Command .gitlab/ci/clang.ps1
- Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
@@ -407,6 +411,7 @@
stage: test-ext
script:
+ - . .gitlab/ci/env.ps1
- Invoke-Expression -Command .gitlab/ci/msvc.ps1
- Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
- build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake
@@ -417,6 +422,7 @@
stage: test-ext
script:
+ - . .gitlab/ci/env.ps1
- Invoke-Expression -Command .gitlab/ci/openwatcom.ps1
- $pwdpath = $pwd.Path
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\watcom\binnt;$pwdpath\.gitlab\watcom\binw;$env:PATH"