mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-03 05:08:47 -06:00
Merge topic 'ci-env-scripts'
bf973c41e5ci: Factor out scripts to add sccache to job environmentb0f7aebc77ci: Factor out scripts to add ninja to job environmentef3495f74fci: Factor out scripts to add cmake to job environment Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9452
This commit is contained in:
5
.gitlab/ci/cmake-env.ps1
Executable file
5
.gitlab/ci/cmake-env.ps1
Executable 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
3
.gitlab/ci/cmake-env.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
.gitlab/ci/cmake.sh
|
||||
export PATH="$PWD/.gitlab/cmake/bin:$PATH"
|
||||
cmake --version
|
||||
3
.gitlab/ci/ninja-env.sh
Normal file
3
.gitlab/ci/ninja-env.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
.gitlab/ci/ninja.sh
|
||||
export PATH=$PWD/.gitlab:$PATH
|
||||
ninja --version
|
||||
1
.gitlab/ci/sccache-env.ps1
Executable file
1
.gitlab/ci/sccache-env.ps1
Executable file
@@ -0,0 +1 @@
|
||||
Set-Item -Force -Path "env:PATH" -Value "$env:PATH;$env:SCCACHE_PATH"
|
||||
2
.gitlab/ci/sccache-env.sh
Normal file
2
.gitlab/ci/sccache-env.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
.gitlab/ci/sccache.sh
|
||||
export PATH="$PWD/.gitlab:$PATH"
|
||||
@@ -511,12 +511,8 @@
|
||||
|
||||
.before_script_linux: &before_script_linux
|
||||
- source .gitlab/ci/env.sh
|
||||
- .gitlab/ci/cmake.sh
|
||||
- export PATH=$PWD/.gitlab/cmake/bin:$PATH
|
||||
- .gitlab/ci/ninja.sh
|
||||
- export PATH=$PWD/.gitlab:$PATH
|
||||
- cmake --version
|
||||
- ninja --version
|
||||
- source .gitlab/ci/cmake-env.sh
|
||||
- source .gitlab/ci/ninja-env.sh
|
||||
|
||||
.cmake_prep_source_linux:
|
||||
stage: prep
|
||||
@@ -591,8 +587,7 @@
|
||||
- mkdir -p build/
|
||||
- cp Utilities/Release/linux/$CMAKE_ARCH/cache.txt build/CMakeCache.txt
|
||||
# Make sccache available.
|
||||
- .gitlab/ci/sccache.sh
|
||||
- export PATH=$PWD/.gitlab:$PATH
|
||||
- source .gitlab/ci/sccache-env.sh
|
||||
# Append sccache settings to the cache.
|
||||
- echo "CMAKE_C_COMPILER_LAUNCHER:STRING=sccache" >> build/CMakeCache.txt
|
||||
- echo "CMAKE_CXX_COMPILER_LAUNCHER:STRING=sccache" >> build/CMakeCache.txt
|
||||
|
||||
@@ -175,12 +175,8 @@
|
||||
|
||||
.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
|
||||
- export PATH=$PWD/.gitlab:$PATH
|
||||
- cmake --version
|
||||
- ninja --version
|
||||
- source .gitlab/ci/cmake-env.sh
|
||||
- source .gitlab/ci/ninja-env.sh
|
||||
# Download Qt
|
||||
- cmake -P .gitlab/ci/download_qt.cmake
|
||||
- export CMAKE_PREFIX_PATH=$PWD/.gitlab/qt${CMAKE_PREFIX_PATH:+:$CMAKE_PREFIX_PATH}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -404,7 +400,7 @@
|
||||
|
||||
script:
|
||||
- *before_script_windows
|
||||
- Set-Item -Force -Path "env:PATH" -Value "$env:PATH;$env:SCCACHE_PATH"
|
||||
- . .gitlab/ci/sccache-env.ps1
|
||||
- Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
|
||||
- sccache --start-server
|
||||
- sccache --show-stats
|
||||
|
||||
Reference in New Issue
Block a user