summaryrefslogtreecommitdiffstats
path: root/travis
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@oath.com>2017-10-16 14:03:29 +0200
committerBjørn Christian Seime <bjorncs@oath.com>2017-10-16 21:16:10 +0200
commitc85d8be22ce8095271b0925b1acf78210e089f78 (patch)
treeb71338dde3af7c8cb53a8f3b0550363c2c492907 /travis
parent3db5ac405d7716d9faefe1c933efbe501fbaea92 (diff)
Improve Travis builds
Test install step as separate job for PRs. Use single job for complete build for master branch.
Diffstat (limited to 'travis')
-rw-r--r--travis/cpp-prelude.sh7
-rw-r--r--travis/prelude.sh7
-rwxr-xr-xtravis/travis-build-cpp.sh11
-rwxr-xr-xtravis/travis-build-full.sh15
-rwxr-xr-xtravis/travis-build-install.sh14
-rwxr-xr-xtravis/travis-build-java.sh6
6 files changed, 48 insertions, 12 deletions
diff --git a/travis/cpp-prelude.sh b/travis/cpp-prelude.sh
new file mode 100644
index 00000000000..2cb7633d3d7
--- /dev/null
+++ b/travis/cpp-prelude.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+set -e
+
+export CCACHE_MAXSIZE="1250M"
+export CCACHE_COMPRESS=1
+ccache --print-config
diff --git a/travis/prelude.sh b/travis/prelude.sh
new file mode 100644
index 00000000000..c3467bff05f
--- /dev/null
+++ b/travis/prelude.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+set -e
+
+export SOURCE_DIR=/source
+export NUM_THREADS=4
+source /etc/profile.d/devtoolset-6.sh || true
diff --git a/travis/travis-build-cpp.sh b/travis/travis-build-cpp.sh
index bc2b564d13f..d5ac94fa6b9 100755
--- a/travis/travis-build-cpp.sh
+++ b/travis/travis-build-cpp.sh
@@ -2,17 +2,12 @@
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
set -e
-SOURCE_DIR=/source
-BUILD_DIR=~/build
+source /source/travis/prelude.sh
+source ${SOURCE_DIR}/travis/cpp-prelude.sh
+BUILD_DIR=~/build
mkdir "${BUILD_DIR}"
-export CCACHE_MAXSIZE="1250M"
-export CCACHE_COMPRESS=1
-NUM_THREADS=4
-ccache --print-config
-source /etc/profile.d/devtoolset-6.sh || true
-
cd ${BUILD_DIR}
bash ${SOURCE_DIR}/bootstrap-cpp.sh ${SOURCE_DIR} ${BUILD_DIR}
make -j ${NUM_THREADS}
diff --git a/travis/travis-build-full.sh b/travis/travis-build-full.sh
new file mode 100755
index 00000000000..7ee9a1c065f
--- /dev/null
+++ b/travis/travis-build-full.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+set -e
+
+source /source/travis/prelude.sh
+source ${SOURCE_DIR}/travis/cpp-prelude.sh
+
+cd ${SOURCE_DIR}
+sh ./bootstrap.sh java
+mvn install --no-snapshot-updates --batch-mode --threads ${NUM_THREADS}
+bash ${SOURCE_DIR}/bootstrap-cmake.sh ${SOURCE_DIR}
+make -j ${NUM_THREADS}
+ctest3 --output-on-failure -j ${NUM_THREADS}
+ccache --show-stats
+make install
diff --git a/travis/travis-build-install.sh b/travis/travis-build-install.sh
new file mode 100755
index 00000000000..6469a346045
--- /dev/null
+++ b/travis/travis-build-install.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+set -e
+
+source /source/travis/prelude.sh
+source ${SOURCE_DIR}/travis/cpp-prelude.sh
+
+cd ${SOURCE_DIR}
+sh ./bootstrap.sh java
+mvn install --no-snapshot-updates --batch-mode --threads ${NUM_THREADS} --quiet\
+ -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dmaven.source.skip=true
+bash ${SOURCE_DIR}/bootstrap-cmake.sh ${SOURCE_DIR} "-DEXCLUDE_TESTS_FROM_ALL=TRUE"
+make -j ${NUM_THREADS}
+make install
diff --git a/travis/travis-build-java.sh b/travis/travis-build-java.sh
index 0a69e167dba..37a61d19f69 100755
--- a/travis/travis-build-java.sh
+++ b/travis/travis-build-java.sh
@@ -2,11 +2,9 @@
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
set -e
-SOURCE_DIR=/source
-NUM_THREADS=4
+source /source/travis/prelude.sh
cd "${SOURCE_DIR}"
export MAVEN_OPTS="-Xms128m -Xmx1g"
-source /etc/profile.d/devtoolset-6.sh || true
sh ./bootstrap.sh java
-mvn install -nsu -B -T ${NUM_THREADS} -V # Should ideally split out test phase, but some unit tests fails on 'mvn test'
+mvn install --no-snapshot-updates --batch-mode --threads ${NUM_THREADS}