2019-08-10 18:56:46 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
|
|
|
# Copyright (c) 2019 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
|
|
|
|
|
2019-09-24 22:22:24 +02:00
|
|
|
echo "Setting specific values in env"
|
|
|
|
if [ -n "${FILE_ENV}" ]; then
|
|
|
|
set -o errexit;
|
|
|
|
# shellcheck disable=SC1090
|
|
|
|
source "${FILE_ENV}"
|
|
|
|
fi
|
2019-08-10 18:56:46 +02:00
|
|
|
|
2019-11-21 01:36:29 +01:00
|
|
|
# The root dir.
|
|
|
|
# The ci system copies this folder.
|
|
|
|
# This is where the build is done (depends and dist).
|
2019-08-10 18:56:46 +02:00
|
|
|
BASE_ROOT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../../ >/dev/null 2>&1 && pwd )
|
|
|
|
export BASE_ROOT_DIR
|
|
|
|
|
2019-09-24 22:22:24 +02:00
|
|
|
echo "Fallback to default values in env (if not yet set)"
|
2019-08-27 21:44:57 +02:00
|
|
|
# The number of parallel jobs to pass down to make and test_runner.py
|
|
|
|
export MAKEJOBS=${MAKEJOBS:--j4}
|
|
|
|
# A folder for the ci system to put temporary files (ccache, datadirs for tests, ...)
|
2019-11-21 01:36:29 +01:00
|
|
|
# This folder only exists on the ci host.
|
2019-08-27 21:44:57 +02:00
|
|
|
export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch/}
|
2019-11-04 19:57:02 +01:00
|
|
|
# What host to compile for. See also ./depends/README.md
|
|
|
|
# Tests that need cross-compilation export the appropriate HOST.
|
2019-11-07 19:52:06 +01:00
|
|
|
# Tests that run natively guess the host
|
|
|
|
export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")}
|
2019-09-30 23:26:22 +02:00
|
|
|
# Whether to prefer BusyBox over GNU utilities
|
|
|
|
export USE_BUSY_BOX=${USE_BUSY_BOX:-false}
|
2019-08-10 18:56:46 +02:00
|
|
|
export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-true}
|
|
|
|
export RUN_FUNCTIONAL_TESTS=${RUN_FUNCTIONAL_TESTS:-true}
|
|
|
|
export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false}
|
|
|
|
export DOCKER_NAME_TAG=${DOCKER_NAME_TAG:-ubuntu:18.04}
|
2019-09-24 22:44:40 +02:00
|
|
|
# Randomize test order.
|
|
|
|
# See https://www.boost.org/doc/libs/1_71_0/libs/test/doc/html/boost_test/utf_reference/rt_param_reference/random.html
|
|
|
|
export BOOST_TEST_RANDOM=${BOOST_TEST_RANDOM:-1}
|
2019-08-10 18:56:46 +02:00
|
|
|
export CCACHE_SIZE=${CCACHE_SIZE:-100M}
|
|
|
|
export CCACHE_TEMPDIR=${CCACHE_TEMPDIR:-/tmp/.ccache-temp}
|
|
|
|
export CCACHE_COMPRESS=${CCACHE_COMPRESS:-1}
|
2019-11-21 01:36:29 +01:00
|
|
|
# The cache dir.
|
|
|
|
# This folder exists on the ci host and ci guest. Changes are propagated back and forth.
|
2019-08-27 21:53:02 +02:00
|
|
|
export CCACHE_DIR=${CCACHE_DIR:-$BASE_SCRATCH_DIR/.ccache}
|
2019-11-21 01:36:29 +01:00
|
|
|
# The depends dir.
|
|
|
|
# This folder exists on the ci host and ci guest. Changes are propagated back and forth.
|
|
|
|
export DEPENDS_DIR=${DEPENDS_DIR:-$BASE_ROOT_DIR/depends}
|
|
|
|
# Folder where the build is done (bin and lib).
|
2019-11-21 01:10:55 +01:00
|
|
|
export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out/$HOST}
|
2019-08-10 18:56:46 +02:00
|
|
|
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
|
|
|
|
export WINEDEBUG=${WINEDEBUG:-fixme-all}
|
2019-11-09 15:20:41 +01:00
|
|
|
export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git}
|
2019-08-10 18:56:46 +02:00
|
|
|
export GOAL=${GOAL:-install}
|
2019-11-21 01:10:55 +01:00
|
|
|
export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets}
|
2019-08-10 18:56:46 +02:00
|
|
|
export PATH=${BASE_ROOT_DIR}/ci/retry:$PATH
|
|
|
|
export CI_RETRY_EXE=${CI_RETRY_EXE:retry}
|