summaryrefslogtreecommitdiff
path: root/ci/build
diff options
context:
space:
mode:
Diffstat (limited to 'ci/build')
-rwxr-xr-xci/build30
1 files changed, 18 insertions, 12 deletions
diff --git a/ci/build b/ci/build
index 3b42db63..9cc44297 100755
--- a/ci/build
+++ b/ci/build
@@ -1,15 +1,21 @@
-#!/bin/sh -ex
-# This script is used by .travis.yml and build-in-docker
+#!/bin/sh
+#
+# This script is used by .travis.yml and build-in-docker.
-if [ -n "${SPECIAL}" ]; then
- sh ci/${SPECIAL}
+set -eu
+
+if [ -n "${VERBOSE:-}" ]; then
+ set -x
+fi
+
+if [ -n "${SPECIAL:-}" ]; then
+ exec "ci/$SPECIAL"
else
- mkdir -p ${BUILDDIR:-build}
- cd ${BUILDDIR:-build}
- ${CMAKE_PREFIX:-} cmake ${CCACHE_LOC:-..} ${CMAKE_PARAMS:-}
- # 4 threads seems a reasonable default for Travis
- ${CMAKE_PREFIX:-} cmake --build . ${BUILDEXTRAFLAGS:-} -- -j4
- # Warning: Rare random failures when running with j4.
- test "${RUN_TESTS:-1}" -eq "1" && ctest --output-on-failure -j1
+ mkdir -p ${BUILDDIR:-build}
+ cd ${BUILDDIR:-build}
+ ${CMAKE_PREFIX:-} cmake "${CCACHE_LOC:-..}" ${CMAKE_PARAMS:-}
+ # 4 jobs seem to be a reasonable default for Travis.
+ ${CMAKE_PREFIX:-} cmake --build . ${BUILDEXTRAFLAGS:-} -- -j4
+ # Warning: Rare random failures when running with -j4.
+ [ "${RUN_TESTS:-1}" -ne "1" ] || ctest --output-on-failure -j1
fi
-exit 0