Inside Bitcoin
Opening the selected file…
Inside Bitcoin
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) 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[ "${CI_CONFIG+x}" ] && source "$CI_CONFIG"13: "${CI_DIR:=build}"14if ! [ -v BUILD_TARGETS ]; then15BUILD_TARGETS=(all tests mpexamples)16fi18[ -n "${CI_CLEAN-}" ] && rm -rf "${CI_DIR}"20cmake --version21cmake_ver=$(cmake --version | awk '/version/{print $3; exit}')22ver_ge() { [ "$(printf '%s\n' "$2" "$1" | sort -V | head -n1)" = "$2" ]; }24src_dir=$PWD25mkdir -p "$CI_DIR"26cd "$CI_DIR"27cmake "$src_dir" "${CMAKE_ARGS[@]+"${CMAKE_ARGS[@]}"}"28if ver_ge "$cmake_ver" "3.15"; then29cmake --build . -t "${BUILD_TARGETS[@]}" -- "${BUILD_ARGS[@]+"${BUILD_ARGS[@]}"}"30else31# Older versions of cmake can only build one target at a time with --target,32# and do not support -t shortcut33for t in "${BUILD_TARGETS[@]}"; do34cmake --build . --target "$t" -- "${BUILD_ARGS[@]+"${BUILD_ARGS[@]}"}"35done36fi37ctest --output-on-failure
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.