mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 14:08:35 +08:00
ci: add pre-build step after configure but before build
This commit is contained in:
4
.gitlab/ci/pre_build.ps1
Normal file
4
.gitlab/ci/pre_build.ps1
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().MainModule.FileName
|
||||||
|
if (Test-Path -Path ".gitlab/ci/pre_build_$env:CMAKE_CONFIGURATION.ps1" -PathType Leaf) {
|
||||||
|
. ".gitlab/ci/pre_build_$env:CMAKE_CONFIGURATION.ps1"
|
||||||
|
}
|
18
.gitlab/ci/pre_build.sh
Executable file
18
.gitlab/ci/pre_build.sh
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
quietly() {
|
||||||
|
readonly log="/tmp/quietly-$RANDOM.log"
|
||||||
|
if ! "$@" >"$log" 2>&1; then
|
||||||
|
ret=$?
|
||||||
|
cat "$log"
|
||||||
|
rm -f "$log"
|
||||||
|
exit $ret
|
||||||
|
fi
|
||||||
|
rm -f "$log"
|
||||||
|
}
|
||||||
|
|
||||||
|
if test -r ".gitlab/ci/pre_build_${CMAKE_CONFIGURATION}.sh"; then
|
||||||
|
source ".gitlab/ci/pre_build_${CMAKE_CONFIGURATION}.sh"
|
||||||
|
fi
|
@@ -717,6 +717,7 @@
|
|||||||
- sccache --show-stats
|
- sccache --show-stats
|
||||||
- .gitlab/ci/pre_configure.sh
|
- .gitlab/ci/pre_configure.sh
|
||||||
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
|
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
|
||||||
|
- .gitlab/ci/pre_build.sh
|
||||||
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
|
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
|
||||||
- .gitlab/ci/post_build.sh
|
- .gitlab/ci/post_build.sh
|
||||||
- sccache --show-stats
|
- sccache --show-stats
|
||||||
|
@@ -202,6 +202,7 @@
|
|||||||
- sccache --show-stats
|
- sccache --show-stats
|
||||||
- .gitlab/ci/pre_configure.sh
|
- .gitlab/ci/pre_configure.sh
|
||||||
- ctest -VV -S .gitlab/ci/ctest_configure.cmake
|
- ctest -VV -S .gitlab/ci/ctest_configure.cmake
|
||||||
|
- .gitlab/ci/pre_build.sh
|
||||||
- ctest -VV -S .gitlab/ci/ctest_build.cmake
|
- ctest -VV -S .gitlab/ci/ctest_build.cmake
|
||||||
- .gitlab/ci/post_build.sh
|
- .gitlab/ci/post_build.sh
|
||||||
- sccache --show-stats
|
- sccache --show-stats
|
||||||
|
@@ -445,6 +445,7 @@
|
|||||||
- sccache --show-stats
|
- sccache --show-stats
|
||||||
- (& "$pwsh" -File ".gitlab/ci/pre_configure.ps1")
|
- (& "$pwsh" -File ".gitlab/ci/pre_configure.ps1")
|
||||||
- ctest -VV -S .gitlab/ci/ctest_configure.cmake
|
- ctest -VV -S .gitlab/ci/ctest_configure.cmake
|
||||||
|
- (& "$pwsh" -File ".gitlab/ci/pre_build.ps1")
|
||||||
- ctest -VV -S .gitlab/ci/ctest_build.cmake
|
- ctest -VV -S .gitlab/ci/ctest_build.cmake
|
||||||
- (& "$pwsh" -File ".gitlab/ci/post_build.ps1")
|
- (& "$pwsh" -File ".gitlab/ci/post_build.ps1")
|
||||||
- sccache --show-stats
|
- sccache --show-stats
|
||||||
|
Reference in New Issue
Block a user