gitlab-ci: init environment with per-CMAKE_CONFIGURATION shell scripts

This commit is contained in:
Brad King
2021-03-12 13:02:43 -05:00
parent 256c320fb6
commit 747940157f
2 changed files with 16 additions and 0 deletions

14
.gitlab/ci/env.sh Normal file
View File

@@ -0,0 +1,14 @@
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/env_${CMAKE_CONFIGURATION}.sh"; then
source ".gitlab/ci/env_${CMAKE_CONFIGURATION}.sh"
fi

View File

@@ -195,6 +195,7 @@
## Linux-specific scripts
.before_script_linux: &before_script_linux
- source .gitlab/ci/env.sh
- .gitlab/ci/cmake.sh
- .gitlab/ci/ninja.sh
- export PATH=$PWD/.gitlab:$PWD/.gitlab/cmake/bin:$PATH
@@ -251,6 +252,7 @@
stage: build
script:
- source .gitlab/ci/env.sh
# Bootstrap.
- mkdir -p build/
# Exclude documentation. A job dependency provides it for packaging.