mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 05:10:10 -05:00
ci: add support for gitlab-runner 'shell = pwsh' executor
Run powershell child scripts using the same powershell tool as the parent script.
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().MainModule.FileName
|
||||||
if (Test-Path -Path ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1" -PathType Leaf) {
|
if (Test-Path -Path ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1" -PathType Leaf) {
|
||||||
. ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1"
|
. ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ if ("$env:CMAKE_CI_NIGHTLY" -eq "true") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$pwdpath = $pwd.Path
|
$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"
|
Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab;$env:PATH"
|
||||||
ninja --version
|
ninja --version
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
$pwdpath = $pwd.Path
|
$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"
|
Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\ispc\bin;$env:PATH"
|
||||||
ispc --version
|
ispc --version
|
||||||
|
|||||||
@@ -295,11 +295,11 @@
|
|||||||
.before_script_windows: &before_script_windows
|
.before_script_windows: &before_script_windows
|
||||||
- . .gitlab/ci/env.ps1
|
- . .gitlab/ci/env.ps1
|
||||||
- $pwdpath = $pwd.Path
|
- $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"
|
- 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"
|
- 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"
|
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab;$env:PATH"
|
||||||
- (& "$env:WIX\bin\light.exe" -help) | Select -First 1
|
- (& "$env:WIX\bin\light.exe" -help) | Select -First 1
|
||||||
- cmake --version
|
- cmake --version
|
||||||
@@ -398,7 +398,7 @@
|
|||||||
script:
|
script:
|
||||||
- . .gitlab/ci/env.ps1
|
- . .gitlab/ci/env.ps1
|
||||||
- $pwdpath = $pwd.Path
|
- $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"
|
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab;$env:PATH"
|
||||||
- Invoke-Expression -Command .gitlab/ci/clang.ps1
|
- Invoke-Expression -Command .gitlab/ci/clang.ps1
|
||||||
- Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
|
- Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
|
||||||
|
|||||||
Reference in New Issue
Block a user