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# Copyright (c) The Bitcoin Core developers2# Distributed under the MIT software license, see the accompanying3# file COPYING or https://opensource.org/license/mit.5# Test libmultiprocess inside Bitcoin Core by replacing the subtree copy6# with the version from this PR, then building and running IPC-related7# unit & functional tests.9name: Bitcoin Core CI11on:12push:13pull_request:15concurrency:16group: ${{ github.workflow }}-${{ github.ref }}17cancel-in-progress: true19env:20BITCOIN_REPO: bitcoin/bitcoin21LLVM_VERSION: 2222LIBCXX_DIR: /tmp/libcxx-build/24jobs:25bitcoin-core:26name: ${{ matrix.name }}27runs-on: ${{ matrix.runner }}28timeout-minutes: 12030strategy:31fail-fast: false32matrix:33include:34- name: 'ASan + UBSan'35unit_test_runs: 1536functional_test_runs: 2037nproc_multiplier: 238functional_timeout_factor: 4039runner: ubuntu-24.0440apt-llvm: true41packages: >-42ccache43clang-2244llvm-2245libclang-rt-22-dev46libboost-dev47libsqlite3-dev48libcapnp-dev49capnproto50ninja-build51pkgconf52python3-pip53pip-packages: --break-system-packages pycapnp54cmake-args: |-55-DSANITIZERS=address,float-divide-by-zero,integer,undefined56-DCMAKE_C_COMPILER=clang57-DCMAKE_CXX_COMPILER=clang++58-DCMAKE_C_FLAGS=-ftrivial-auto-var-init=pattern59-DCMAKE_CXX_FLAGS=-ftrivial-auto-var-init=pattern61- name: 'macOS'62unit_test_runs: 5063functional_test_runs: 2064nproc_multiplier: 265functional_timeout_factor: 4066runner: macos-1567brew-packages: ccache capnp boost sqlite pkgconf ninja68pip-packages: --break-system-packages pycapnp69cmake-args: |-70-DREDUCE_EXPORTS=ON72env:73CCACHE_MAXSIZE: 400M74CCACHE_DIR: ${{ github.workspace }}/.ccache76steps:77- name: Checkout Bitcoin Core78uses: actions/checkout@v479with:80repository: ${{ env.BITCOIN_REPO }}81fetch-depth: 183- name: Checkout libmultiprocess84uses: actions/checkout@v485with:86path: _libmultiprocess88- name: Replace libmultiprocess subtree89run: _libmultiprocess/ci/scripts/bitcoin_core_ci.sh replace_subtree91- name: Add LLVM apt repository92if: matrix.apt-llvm93run: _libmultiprocess/ci/scripts/bitcoin_core_ci.sh add_llvm_apt_repository95- name: Install APT packages96if: matrix.packages97run: _libmultiprocess/ci/scripts/ci_helpers.sh install_apt_packages ${{ matrix.packages }}99- name: Configure LLVM alternatives100if: matrix.packages101run: _libmultiprocess/ci/scripts/bitcoin_core_ci.sh install_llvm_alternatives103- name: Install Homebrew packages104if: matrix.brew-packages105run: _libmultiprocess/ci/scripts/ci_helpers.sh install_homebrew_packages ${{ matrix.brew-packages }}107- name: Install pip packages108if: matrix.pip-packages109run: _libmultiprocess/ci/scripts/ci_helpers.sh install_pip_packages ${{ matrix.pip-packages }}111- name: Determine parallelism112run: _libmultiprocess/ci/scripts/ci_helpers.sh determine_parallelism "${{ matrix.nproc_multiplier }}"114- name: Restore ccache115id: ccache-restore116uses: actions/cache/restore@v4117with:118path: ${{ env.CCACHE_DIR }}119key: ccache-${{ matrix.name }}-${{ github.ref }}-${{ github.sha }}120restore-keys: |121ccache-${{ matrix.name }}-${{ github.ref }}-122ccache-${{ matrix.name }}-124- name: Reset ccache stats125if: matrix.packages || matrix.brew-packages126run: _libmultiprocess/ci/scripts/ci_helpers.sh reset_ccache_stats128- name: CMake configure129env:130BITCOIN_CORE_CMAKE_ARGS: ${{ matrix.cmake-args }}131run: _libmultiprocess/ci/scripts/bitcoin_core_ci.sh configure_bitcoin_core133- name: Build134run: _libmultiprocess/ci/scripts/bitcoin_core_ci.sh build_bitcoin_core136- name: Show ccache stats137if: matrix.packages || matrix.brew-packages138run: _libmultiprocess/ci/scripts/ci_helpers.sh show_ccache_stats140- name: Run IPC unit tests141env:142ASAN_OPTIONS: detect_leaks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1143LSAN_OPTIONS: suppressions=${{ github.workspace }}/test/sanitizer_suppressions/lsan144UBSAN_OPTIONS: suppressions=${{ github.workspace }}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1145run: _libmultiprocess/ci/scripts/bitcoin_core_ci.sh run_ipc_unit_tests "${{ matrix.unit_test_runs }}"147- name: Run IPC functional tests148env:149ASAN_OPTIONS: detect_leaks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1150LSAN_OPTIONS: suppressions=${{ github.workspace }}/test/sanitizer_suppressions/lsan151UBSAN_OPTIONS: suppressions=${{ github.workspace }}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1152CI_FAILFAST_TEST_LEAVE_DANGLING: 1153run: _libmultiprocess/ci/scripts/bitcoin_core_ci.sh run_ipc_functional_tests "${{ matrix.functional_test_runs }}" "${{ matrix.functional_timeout_factor }}"155- name: Save ccache156uses: actions/cache/save@v4157if: github.ref == 'refs/heads/master' || steps.ccache-restore.outputs.cache-hit != 'true'158with:159path: ${{ env.CCACHE_DIR }}160key: ccache-${{ matrix.name }}-${{ github.ref }}-${{ github.sha }}162bitcoin-core-tsan:163name: ${{ matrix.name }}164runs-on: ubuntu-24.04165timeout-minutes: 180167strategy:168matrix:169include:170- name: TSan171unit_test_runs: 8172functional_test_runs: 25173nproc_multiplier: 2174functional_timeout_factor: 40176env:177CCACHE_MAXSIZE: 400M178CCACHE_DIR: ${{ github.workspace }}/.ccache179LIBCXX_FLAGS: >-180-fsanitize=thread181-nostdinc++182-nostdlib++183-isystem /tmp/libcxx-build/include/c++/v1184-L/tmp/libcxx-build/lib185-Wl,-rpath,/tmp/libcxx-build/lib186-lc++187-lc++abi188-lpthread189-Wno-unused-command-line-argument190TSAN_OPTIONS: suppressions=${{ github.workspace }}/test/sanitizer_suppressions/tsan:halt_on_error=1:second_deadlock_stack=1192steps:193- name: Checkout Bitcoin Core194uses: actions/checkout@v4195with:196repository: ${{ env.BITCOIN_REPO }}197fetch-depth: 1199- name: Checkout libmultiprocess200uses: actions/checkout@v4201with:202path: _libmultiprocess204- name: Add LLVM apt repository205run: _libmultiprocess/ci/scripts/bitcoin_core_ci.sh add_llvm_apt_repository207- name: Install packages208run: _libmultiprocess/ci/scripts/bitcoin_core_ci.sh install_tsan_packages210- name: Determine parallelism211run: _libmultiprocess/ci/scripts/ci_helpers.sh determine_parallelism "${{ matrix.nproc_multiplier }}"213- name: Restore instrumented libc++ cache214id: libcxx-cache215uses: actions/cache@v4216with:217path: ${{ env.LIBCXX_DIR }}218key: libcxx-Thread-llvmorg-${{ env.LLVM_VERSION }}.1.0220- name: Build instrumented libc++221if: steps.libcxx-cache.outputs.cache-hit != 'true'222run: _libmultiprocess/ci/scripts/bitcoin_core_ci.sh build_instrumented_libcxx224- name: Determine host225id: host226run: _libmultiprocess/ci/scripts/ci_helpers.sh determine_host228- name: Restore depends cache229id: depends-cache230uses: actions/cache/restore@v4231with:232path: |233depends/built234depends/${{ steps.host.outputs.host }}235key: depends-tsan-${{ hashFiles('depends/packages/*.mk') }}-${{ env.LLVM_VERSION }}237- name: Build depends (stage 1, without IPC)238if: steps.depends-cache.outputs.cache-hit != 'true'239run: _libmultiprocess/ci/scripts/bitcoin_core_ci.sh build_depends_without_ipc241- name: Save depends cache242uses: actions/cache/save@v4243if: steps.depends-cache.outputs.cache-hit != 'true'244with:245path: |246depends/built247depends/${{ steps.host.outputs.host }}248key: depends-tsan-${{ hashFiles('depends/packages/*.mk') }}-${{ env.LLVM_VERSION }}250- name: Replace libmultiprocess subtree
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.