diff options
author | Brad King <brad.king@kitware.com> | 2021-03-12 18:02:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-03-17 15:41:25 (GMT) |
commit | 747940157f897bfaf875a85d30dad1f1902094b9 (patch) | |
tree | a3c431e0d59dc7e770edc8e9a8eec6a8879ea2ad /.gitlab | |
parent | 256c320fb6aea90f6544bcefe8dbde497b40351f (diff) | |
download | CMake-747940157f897bfaf875a85d30dad1f1902094b9.zip CMake-747940157f897bfaf875a85d30dad1f1902094b9.tar.gz CMake-747940157f897bfaf875a85d30dad1f1902094b9.tar.bz2 |
gitlab-ci: init environment with per-CMAKE_CONFIGURATION shell scripts
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/ci/env.sh | 14 | ||||
-rw-r--r-- | .gitlab/os-linux.yml | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/.gitlab/ci/env.sh b/.gitlab/ci/env.sh new file mode 100644 index 0000000..7634f5d --- /dev/null +++ b/.gitlab/ci/env.sh @@ -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 diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index e40760e..7496e9e 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -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. |