ci: Factor out scripts to add cmake to job environment

This commit is contained in:
Brad King 2024-04-22 18:11:11 -04:00
parent f1b3143ee9
commit ef3495f74f
5 changed files with 11 additions and 11 deletions

5
.gitlab/ci/cmake-env.ps1 Executable file
View File

@ -0,0 +1,5 @@
$pwdpath = $pwd.Path
& "$pwsh" -File ".gitlab/ci/cmake.ps1"
Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\cmake\bin;$env:PATH"
cmake --version
$cmake = "cmake"

3
.gitlab/ci/cmake-env.sh Normal file
View File

@ -0,0 +1,3 @@
.gitlab/ci/cmake.sh
export PATH="$PWD/.gitlab/cmake/bin:$PATH"
cmake --version

View File

@ -511,11 +511,9 @@
.before_script_linux: &before_script_linux
- source .gitlab/ci/env.sh
- .gitlab/ci/cmake.sh
- export PATH=$PWD/.gitlab/cmake/bin:$PATH
- source .gitlab/ci/cmake-env.sh
- .gitlab/ci/ninja.sh
- export PATH=$PWD/.gitlab:$PATH
- cmake --version
- ninja --version
.cmake_prep_source_linux:

View File

@ -175,11 +175,9 @@
.before_script_macos: &before_script_macos
- source .gitlab/ci/env.sh
- .gitlab/ci/cmake.sh
- export PATH=$PWD/.gitlab/cmake/bin:$PATH
- source .gitlab/ci/cmake-env.sh
- .gitlab/ci/ninja.sh
- export PATH=$PWD/.gitlab:$PATH
- cmake --version
- ninja --version
# Download Qt
- cmake -P .gitlab/ci/download_qt.cmake

View File

@ -386,12 +386,8 @@
.before_script_windows: &before_script_windows
- . .gitlab/ci/env.ps1
- $pwdpath = $pwd.Path
- (& "$pwsh" -File ".gitlab/ci/cmake.ps1")
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\cmake\bin;$env:PATH"
- $cmake = "cmake"
- . .gitlab/ci/cmake-env.ps1
- . .gitlab/ci/ninja-env.ps1
- cmake --version
- . .gitlab/ci/qt-env.ps1
- . .gitlab/ci/python-env.ps1