mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-03 13:18:37 -06:00
ci: Factor out scripts to add sccache to job environment
This commit is contained in:
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"
|
||||||
@@ -587,8 +587,7 @@
|
|||||||
- mkdir -p build/
|
- mkdir -p build/
|
||||||
- cp Utilities/Release/linux/$CMAKE_ARCH/cache.txt build/CMakeCache.txt
|
- cp Utilities/Release/linux/$CMAKE_ARCH/cache.txt build/CMakeCache.txt
|
||||||
# Make sccache available.
|
# Make sccache available.
|
||||||
- .gitlab/ci/sccache.sh
|
- source .gitlab/ci/sccache-env.sh
|
||||||
- export PATH=$PWD/.gitlab:$PATH
|
|
||||||
# Append sccache settings to the cache.
|
# Append sccache settings to the cache.
|
||||||
- echo "CMAKE_C_COMPILER_LAUNCHER:STRING=sccache" >> build/CMakeCache.txt
|
- echo "CMAKE_C_COMPILER_LAUNCHER:STRING=sccache" >> build/CMakeCache.txt
|
||||||
- echo "CMAKE_CXX_COMPILER_LAUNCHER:STRING=sccache" >> build/CMakeCache.txt
|
- echo "CMAKE_CXX_COMPILER_LAUNCHER:STRING=sccache" >> build/CMakeCache.txt
|
||||||
|
|||||||
@@ -400,7 +400,7 @@
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- *before_script_windows
|
- *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
|
- Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
|
||||||
- sccache --start-server
|
- sccache --start-server
|
||||||
- sccache --show-stats
|
- sccache --show-stats
|
||||||
|
|||||||
Reference in New Issue
Block a user