From 3e791592ad44a6d44599bda346c85983e6fe89eb Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 6 Jun 2022 12:40:11 -0400 Subject: 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. --- .gitlab/ci/env.ps1 | 3 +++ .gitlab/os-macos.yml | 1 + .gitlab/os-windows.yml | 2 ++ 3 files changed, 6 insertions(+) create mode 100755 .gitlab/ci/env.ps1 diff --git a/.gitlab/ci/env.ps1 b/.gitlab/ci/env.ps1 new file mode 100755 index 0000000..e24bc37 --- /dev/null +++ b/.gitlab/ci/env.ps1 @@ -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" +} diff --git a/.gitlab/os-macos.yml b/.gitlab/os-macos.yml index f36fe6d..da4757a 100644 --- a/.gitlab/os-macos.yml +++ b/.gitlab/os-macos.yml @@ -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 diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml index e5febbe..be9ac6c 100644 --- a/.gitlab/os-windows.yml +++ b/.gitlab/os-windows.yml @@ -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 -- cgit v0.12