diff options
author | Julian Fleischer <tirednesscankill@warhog.net> | 2018-08-03 17:27:08 +0200 |
---|---|---|
committer | Julian Fleischer <tirednesscankill@warhog.net> | 2018-08-27 12:23:25 +0200 |
commit | 272306ea57116c0c9afc0f73161929be978fe9a8 (patch) | |
tree | b3d09178f138ea439f84c0946f3bfb7a1d6e9015 /.travis/test_06_script.sh | |
parent | 519e2739cf6fac98ec24888b36b011f1c6b98bbc (diff) |
number .travis/ script according to build lifecycle and add README to explain
Diffstat (limited to '.travis/test_06_script.sh')
-rwxr-xr-x | .travis/test_06_script.sh | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/.travis/test_06_script.sh b/.travis/test_06_script.sh new file mode 100755 index 0000000000..30096eff8a --- /dev/null +++ b/.travis/test_06_script.sh @@ -0,0 +1,67 @@ +#!/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 + +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 + +BEGIN_FOLD build +DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false ) +END_FOLD + +if [ "$RUN_TESTS" = "true" ]; then + BEGIN_FOLD unit-tests + DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1 + END_FOLD +fi + +if [ "$RUN_BENCH" = "true" ]; then + BEGIN_FOLD bench + DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib $OUTDIR/bin/bench_bitcoin -scaling=0.001 + END_FOLD +fi + +if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then + extended="--extended --exclude feature_pruning,feature_dbcrash" +fi + +if [ "$RUN_TESTS" = "true" ]; then + BEGIN_FOLD functional-tests + DOCKER_EXEC test/functional/test_runner.py --combinedlogslen=4000 --coverage --quiet --failfast ${extended} + END_FOLD +fi |