summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab/ci/env.sh14
-rw-r--r--.gitlab/os-linux.yml2
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.