mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-23 23:27:21 +01:00
-BEGIN VERIFY SCRIPT- # Use ci DEPENDS_DIR sed -i -e 's|BASE_BUILD_DIR/depends|DEPENDS_DIR|g' $(git grep -l depends ci) sed -i -e 's| depends/| ${DEPENDS_DIR}/|g' $(git grep -l depends ci) # Remove redundant alias sed -i -e 's|BASE_BUILD_DIR|BASE_ROOT_DIR|g' $(git grep -l BASE_BUILD_DIR ci) -END VERIFY SCRIPT-
58 lines
1.8 KiB
Bash
Executable file
58 lines
1.8 KiB
Bash
Executable file
#!/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
|
|
|
|
BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$DEPENDS_DIR/$HOST --bindir=$BASE_OUTDIR/bin --libdir=$BASE_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
|
|
|
|
# Create folder on host and docker, so that `cd` works
|
|
mkdir -p build
|
|
DOCKER_EXEC mkdir -p build
|
|
|
|
# Temporarily disable errexit, because Travis macOS fails without error message
|
|
set +o errexit
|
|
cd build || (echo "could not enter build directory"; exit 1)
|
|
set -o errexit
|
|
|
|
BEGIN_FOLD configure
|
|
DOCKER_EXEC ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (DOCKER_EXEC cat config.log) && false)
|
|
END_FOLD
|
|
|
|
BEGIN_FOLD distdir
|
|
# Create folder on host and docker, so that `cd` works
|
|
mkdir -p "bitcoin-$HOST"
|
|
DOCKER_EXEC make distdir VERSION=$HOST
|
|
END_FOLD
|
|
|
|
set +o errexit
|
|
cd "bitcoin-$HOST" || (echo "could not enter distdir bitcoin-$HOST"; exit 1)
|
|
set -o errexit
|
|
|
|
BEGIN_FOLD configure
|
|
DOCKER_EXEC ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (DOCKER_EXEC cat config.log) && false)
|
|
END_FOLD
|
|
|
|
set -o errtrace
|
|
trap 'DOCKER_EXEC "cat ${BASE_SCRATCH_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
|
|
|
|
set +o errexit
|
|
cd ${BASE_ROOT_DIR} || (echo "could not enter base root dir $BASE_ROOT_DIR"; exit 1)
|
|
set -o errexit
|