Inside Bitcoin
Opening the selected file…
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1#!/usr/bin/env bash2#3# Copyright (c) 2019-present The Bitcoin Core developers4# Distributed under the MIT software license, see the accompanying5# file COPYING or http://www.opensource.org/licenses/mit-license.php.7export LC_ALL=C.UTF-89set -o errexit -o nounset -o pipefail -o xtrace11# The source root dir, usually from git, usually read-only.12# The ci system copies this folder.13BASE_READ_ONLY_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../../ >/dev/null 2>&1 && pwd )14export BASE_READ_ONLY_DIR15# The destination root dir inside the container.16# This folder will also hold any SDKs.17# This folder only exists on the ci guest and will be a copy of BASE_READ_ONLY_DIR.18# This value is embedded in the CI image at build time; changing it requires19# rebuilding the image.20export BASE_ROOT_DIR="${BASE_ROOT_DIR:-/ci_container_base}"21# The depends dir.22# This folder exists only on the ci guest, and on the ci host as a volume.23export DEPENDS_DIR=${DEPENDS_DIR:-$BASE_ROOT_DIR/depends}24# A folder for the ci system to put temporary files (build result, datadirs for tests, ...)25# The name contains a space and a non-ASCII symbol to confirm the build and26# tests handle word-splitting and UTF8 correctly.27# This folder only exists on the ci guest.28export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch_ ₿🧪_}30echo "Setting specific values in env"31# shellcheck disable=SC109032source "${FILE_ENV}"34echo "Fallback to default values in env (if not yet set)"35# The number of parallel jobs to pass down to make and test_runner.py36export MAKEJOBS=${MAKEJOBS:--j$(if command -v nproc > /dev/null 2>&1; then nproc; else sysctl -n hw.logicalcpu; fi)}38export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:-true}39export RUN_FUNCTIONAL_TESTS=${RUN_FUNCTIONAL_TESTS:-true}40export RUN_TIDY=${RUN_TIDY:-false}41# By how much to scale the test_runner timeouts (option --timeout-factor).42# This is needed because some ci machines have slow CPU or disk, so sanitizers43# might be slow or a reindex might be waiting on disk IO.44export TEST_RUNNER_TIMEOUT_FACTOR=${TEST_RUNNER_TIMEOUT_FACTOR:-40}45export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false}47# Randomize test order.48# See https://www.boost.org/doc/libs/1_71_0/libs/test/doc/html/boost_test/utf_reference/rt_param_reference/random.html49export BOOST_TEST_RANDOM=${BOOST_TEST_RANDOM:-1}50# See man 7 debconf51export DEBIAN_FRONTEND=noninteractive52export CCACHE_MAXSIZE=${CCACHE_MAXSIZE:-2G}53export CCACHE_TEMPDIR=${CCACHE_TEMPDIR:-/tmp/.ccache-temp}54export CCACHE_COMPRESS=${CCACHE_COMPRESS:-1}55# The cache dir.56# This folder exists only on the ci guest, and on the ci host as a volume.57export CCACHE_DIR="${CCACHE_DIR:-$BASE_SCRATCH_DIR/ccache}"58# Folder where the build result is put (bin and lib).59export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out}60# The folder for previous release binaries.61# This folder exists only on the ci guest, and on the ci host as a volume.62export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/prev_releases}63export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential pkgconf curl ca-certificates ccache python3-dev rsync git procps bison e2fsprogs cmake ninja-build}64export GOAL=${GOAL:-install}65export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets}66export CI_RETRY_EXE=${CI_RETRY_EXE:-"retry"}68# The --platform argument used with `docker build` and `docker run`.69export CI_IMAGE_PLATFORM=${CI_IMAGE_PLATFORM:-"linux"} # Force linux, but use native arch by default
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.