aboutsummaryrefslogtreecommitdiff
path: root/.travis/test_06_script_a.sh
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-01-31 16:28:02 -0500
committerMarcoFalke <falke.marco@gmail.com>2019-02-01 15:20:00 -0500
commitfacaae4cc4b3a44fb0332a40865eed8f2bbd6864 (patch)
tree8a8ed2fe667cbf662f46e06899457e25fbebd834 /.travis/test_06_script_a.sh
parentfaee6c9cacde79e905aaf3c137d0295f4c6ddea2 (diff)
downloadbitcoin-facaae4cc4b3a44fb0332a40865eed8f2bbd6864.tar.xz
travis: Save cache when compilation took very long
Diffstat (limited to '.travis/test_06_script_a.sh')
-rwxr-xr-x.travis/test_06_script_a.sh50
1 files changed, 50 insertions, 0 deletions
diff --git a/.travis/test_06_script_a.sh b/.travis/test_06_script_a.sh
new file mode 100755
index 0000000000..8cc593f936
--- /dev/null
+++ b/.travis/test_06_script_a.sh
@@ -0,0 +1,50 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2018 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+export LC_ALL=C.UTF-8
+
+TRAVIS_COMMIT_LOG=$(git log --format=fuller -1)
+export TRAVIS_COMMIT_LOG
+
+OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
+BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib"
+if [ -z "$NO_DEPENDS" ]; then
+ DOCKER_EXEC ccache --max-size=$CCACHE_SIZE
+fi
+
+BEGIN_FOLD autogen
+if [ -n "$CONFIG_SHELL" ]; then
+ DOCKER_EXEC "$CONFIG_SHELL" -c "./autogen.sh"
+else
+ DOCKER_EXEC ./autogen.sh
+fi
+END_FOLD
+
+mkdir build
+cd build || (echo "could not enter build directory"; exit 1)
+
+BEGIN_FOLD configure
+DOCKER_EXEC ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
+END_FOLD
+
+BEGIN_FOLD distdir
+DOCKER_EXEC make distdir VERSION=$HOST
+END_FOLD
+
+cd "bitcoin-$HOST" || (echo "could not enter distdir bitcoin-$HOST"; exit 1)
+
+BEGIN_FOLD configure
+DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
+END_FOLD
+
+set -o errtrace
+trap 'DOCKER_EXEC "cat ${TRAVIS_BUILD_DIR}/sanitizer-output/* 2> /dev/null"' ERR
+
+BEGIN_FOLD build
+DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false )
+END_FOLD
+
+cd ${TRAVIS_BUILD_DIR} || (echo "could not enter travis build dir $TRAVIS_BUILD_DIR"; exit 1)