gitlab-ci: init macOS and Windows jobs with per-CMAKE_CONFIGURATION scripts

Apply the approach from commit 747940157f (gitlab-ci: init environment
with per-CMAKE_CONFIGURATION shell scripts, 2021-03-12,
v3.21.0-rc1~480^2~4) to macOS and Windows too.
This commit is contained in:
Brad King
2022-06-06 12:40:11 -04:00
parent ab1edff492
commit 3e791592ad
3 changed files with 6 additions and 0 deletions

3
.gitlab/ci/env.ps1 Executable file
View File

@@ -0,0 +1,3 @@
if (Test-Path -Path ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1" -PathType Leaf) {
Invoke-Expression ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1"
}

View File

@@ -126,6 +126,7 @@
## macOS-specific scripts
.before_script_macos: &before_script_macos
- source .gitlab/ci/env.sh
- .gitlab/ci/cmake.sh
- export PATH=$PWD/.gitlab/cmake/bin:$PATH
- .gitlab/ci/ninja.sh

View File

@@ -234,6 +234,7 @@
## Windows-specific scripts
.before_script_windows: &before_script_windows
- Invoke-Expression -Command .gitlab/ci/env.ps1
- $pwdpath = $pwd.Path
- powershell -File ".gitlab/ci/wix.ps1"
- Set-Item -Force -Path "env:WIX" -Value "$pwdpath\.gitlab\wix"
@@ -292,6 +293,7 @@
stage: test-ext
script:
- Invoke-Expression -Command .gitlab/ci/env.ps1
- build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake
interruptible: true