diff options
author | Arnstein Ressem <aressem@verizonmedia.com> | 2020-12-22 12:47:17 +0100 |
---|---|---|
committer | Arnstein Ressem <aressem@verizonmedia.com> | 2020-12-22 12:47:17 +0100 |
commit | 9b33289fc6595a09979c34340186dd8dacaead06 (patch) | |
tree | 176cf97a219f74e32105ed4a61bb16b8156ab5e3 /travis | |
parent | 3c9108ed10ba6cb0b02eeceb52f3e3176f8b121a (diff) |
Add a screwdriver.yaml that bridges what we currently run on Travis.
Diffstat (limited to 'travis')
-rwxr-xr-x | travis/travis-build.sh | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/travis/travis-build.sh b/travis/travis-build.sh index a638771e950..47d1496b0cf 100755 --- a/travis/travis-build.sh +++ b/travis/travis-build.sh @@ -3,18 +3,21 @@ set -e -export SOURCE_DIR=/source -export NUM_THREADS=6 -export MALLOC_ARENA_MAX=1 -export MAVEN_OPTS="-Xss1m -Xms128m -Xmx2g" +readonly SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd )" +readonly NUM_THREADS=$(( $(nproc) + 2 )) + source /etc/profile.d/enable-devtoolset-9.sh source /etc/profile.d/enable-rh-maven35.sh +export MALLOC_ARENA_MAX=1 +export MAVEN_OPTS="-Xss1m -Xms128m -Xmx2g" +export VESPA_MAVEN_EXTRA_OPTS="${VESPA_MAVEN_EXTRA_OPTS:+${VESPA_MAVEN_EXTRA_OPTS} }--no-snapshot-updates --batch-mode --threads ${NUM_THREADS}" + ccache --max-size=1600M ccache --set-config=compression=true ccache -p -if ! source /source/travis/detect-what-to-build.sh; then +if ! source $SOURCE_DIR/travis/detect-what-to-build.sh; then echo "Could not detect what to build." SHOULD_BUILD=all fi @@ -25,19 +28,19 @@ cd ${SOURCE_DIR} case $SHOULD_BUILD in cpp) - env VESPA_MAVEN_EXTRA_OPTS="--no-snapshot-updates --batch-mode --threads ${NUM_THREADS}" sh ./bootstrap.sh full + ./bootstrap.sh full cmake3 -DVESPA_UNPRIVILEGED=no . make -j ${NUM_THREADS} ctest3 --output-on-failure -j ${NUM_THREADS} ccache --show-stats ;; java) - env VESPA_MAVEN_EXTRA_OPTS="--no-snapshot-updates --batch-mode --threads ${NUM_THREADS}" sh ./bootstrap.sh java - mvn -V install --no-snapshot-updates --batch-mode --threads ${NUM_THREADS} + ./bootstrap.sh java + mvn -V $VESPA_MAVEN_EXTRA_OPTS install ;; *) - env VESPA_MAVEN_EXTRA_OPTS="--no-snapshot-updates --batch-mode --threads ${NUM_THREADS}" sh ./bootstrap.sh java - mvn -V install --no-snapshot-updates --batch-mode --threads ${NUM_THREADS} + ./bootstrap.sh java + mvn -V $VESPA_MAVEN_EXTRA_OPTS install cmake3 -DVESPA_UNPRIVILEGED=no . make -j ${NUM_THREADS} ctest3 --output-on-failure -j ${NUM_THREADS} |