You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.6 KiB
51 lines
1.6 KiB
6 years ago
|
#!/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.
|
||
|
|
||
6 years ago
|
export LC_ALL=C.UTF-8
|
||
6 years ago
|
|
||
|
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
|
||
|
|
||
6 years ago
|
set -o errtrace
|
||
|
trap 'DOCKER_EXEC "cat ${TRAVIS_BUILD_DIR}/sanitizer-output/* 2> /dev/null"' ERR
|
||
|
|
||
6 years ago
|
BEGIN_FOLD build
|
||
6 years ago
|
DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false )
|
||
6 years ago
|
END_FOLD
|
||
|
|
||
6 years ago
|
cd ${TRAVIS_BUILD_DIR} || (echo "could not enter travis build dir $TRAVIS_BUILD_DIR"; exit 1)
|