Merge bitcoin/bitcoin#36436: ci: Derive CONTAINER_NAME from the ci config file name
What changed, and why it matters
This commit is a routine cleanup of Bitcoin Core's continuous integration (CI) configuration. It removes duplicated container names from many CI config files and instead derives the container name automatically from each file's name. It also removes a few redundant script settings. There is no change to the Bitcoin software that users run, no change to wallets, networking, consensus, or cryptography, and no security fix or vulnerability introduced.
No security action needed. Treat as normal CI maintenance; standard code-review and CI pass verification are sufficient.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The merge commit refactors CI environment scripts under ci/test/00_setup_env_*.sh and GitHub Actions workflow files. A single line in ci/test/00_setup_env.sh now computes CONTAINER_NAME from the FILE_ENV basename (e.g., 00_setup_env_native_asan.sh becomes ci_native_asan). Consequently, the explicit export CONTAINER_NAME=… lines are removed from 27 per-platform env files, and redundant GOAL=install and set -o errexit declarations are removed where they are already defaulted. The workflow condition for setting mmap_rnd_bits is updated to match the newly derived name ci_native_fuzz_with_msan. The diff is purely build-system/CI hygiene.
Changed components
ci/test/00_setup_env.shci/test/00_setup_env_*.sh platform configuration files.github/workflows/ci.yml.github/actions/configure-environment/action.ymlci/test_run_all.shInspect captured patch +6 / −44
### .github/actions/configure-environment/action.yml
@@ -25,5 +25,5 @@ runs:
- name: Get container name
shell: bash
run: |
- source $FILE_ENV
+ source ci/test/00_setup_env.sh
echo "CONTAINER_NAME=$CONTAINER_NAME" >> "$GITHUB_ENV"
### .github/workflows/ci.yml
@@ -552,7 +552,7 @@ jobs:
run: sed -i "s|\${INSTALL_BCC_TRACING_TOOLS}|true|g" ./ci/test/00_setup_env_native_asan.sh
- name: Set mmap_rnd_bits
- if: ${{ env.CONTAINER_NAME == 'ci_native_tsan' || env.CONTAINER_NAME == 'ci_native_msan' || env.CONTAINER_NAME == 'ci_native_fuzz_msan' }}
+ if: ${{ env.CONTAINER_NAME == 'ci_native_tsan' || env.CONTAINER_NAME == 'ci_native_msan' || env.CONTAINER_NAME == 'ci_native_fuzz_with_msan' }}
# Prevents crashes due to high ASLR entropy
run: sudo sysctl -w vm.mmap_rnd_bits=28
### ci/test/00_setup_env.sh
@@ -8,6 +8,9 @@ export LC_ALL=C.UTF-8
set -o errexit -o nounset -o pipefail -o xtrace
+CONTAINER_NAME="ci_$(basename "${FILE_ENV/00_setup_env_/}" .sh)"
+export CONTAINER_NAME
+
# The source root dir, usually from git, usually read-only.
# The ci system copies this folder.
BASE_READ_ONLY_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../../ >/dev/null 2>&1 && pwd )
### ci/test/00_setup_env_arm.sh
@@ -10,10 +10,8 @@ export HOST=arm-linux-gnueabihf
export DPKG_ADD_ARCH="armhf"
export PACKAGES="python3-pip python3-zmq g++-arm-linux-gnueabihf libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf"
export PIP_PACKAGES="--break-system-packages pycapnp"
-export CONTAINER_NAME=ci_arm_linux
export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie" # Check that https://packages.debian.org/trixie/g++-arm-linux-gnueabihf (version 14.x, similar to guix) can cross-compile
export CI_IMAGE_PLATFORM="linux/arm64"
-export GOAL="install"
export CI_LIMIT_STACK_SIZE=1
printf -v BITCOIN_CONFIG "%q " \
--preset=dev-mode \
### ci/test/00_setup_env_freebsd_cross.sh
@@ -6,7 +6,6 @@
export LC_ALL=C.UTF-8
-export CONTAINER_NAME=ci_freebsd_cross
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:26.04"
export APT_LLVM_V="23"
export HOST=x86_64-unknown-freebsd
@@ -25,7 +24,6 @@ export DEP_OPTS="build_CC=clang build_CXX=clang++ \
OBJDUMP=llvm-objdump-${APT_LLVM_V} \
RANLIB=llvm-ranlib-${APT_LLVM_V} \
STRIP=llvm-strip-${APT_LLVM_V}"
-export GOAL="install"
printf -v BITCOIN_CONFIG "%q " \
--preset=dev-mode \
-DCMAKE_LINKER_TYPE=LLD \
### ci/test/00_setup_env_i686_no_ipc.sh
@@ -8,13 +8,11 @@ export LC_ALL=C.UTF-8
export HOST=i686-linux-gnu
export DPKG_ADD_ARCH="i386"
-export CONTAINER_NAME=ci_i686_no_multiprocess
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:26.04"
export CI_IMAGE_PLATFORM="linux/amd64"
export CI_CONTAINER_CAP="--security-opt seccomp=unconfined"
export PACKAGES="g++-i686-linux-gnu binutils-i686-linux-gnu libstdc++6:i386 libatomic1:i386"
export DEP_OPTS="DEBUG=1 NO_IPC=1"
-export GOAL="install"
export CI_LIMIT_STACK_SIZE=1
printf -v BITCOIN_CONFIG "%q " \
--preset=dev-mode \
### ci/test/00_setup_env_mac_cross.sh
@@ -8,7 +8,6 @@ export LC_ALL=C.UTF-8
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
-export CONTAINER_NAME=ci_macos_cross
export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie" # Check that https://packages.debian.org/trixie/clang (version 19, similar to guix) can cross-compile
export HOST=arm64-apple-darwin
export PACKAGES="clang lld llvm zip"
### ci/test/00_setup_env_mac_cross_intel.sh
@@ -8,7 +8,6 @@ export LC_ALL=C.UTF-8
export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}
-export CONTAINER_NAME=ci_macos_cross_intel
export CI_IMAGE_NAME_TAG="mirror.gcr.io/debian:trixie" # Check that https://packages.debian.org/trixie/clang (version 19, similar to guix) can cross-compile
export HOST=x86_64-apple-darwin
export PACKAGES="clang lld llvm zip"
### ci/test/00_setup_env_mac_native.sh
@@ -6,7 +6,6 @@
export LC_ALL=C.UTF-8
-export CONTAINER_NAME="ci_mac_native" # macos does not use a container, but the env var is needed for logging
export PIP_PACKAGES="--break-system-packages pycapnp pyzmq"
export GOAL="install deploy"
export RUN_MACOS_CODESIGN=true
### ci/test/00_setup_env_mac_native_fuzz.sh
@@ -6,7 +6,6 @@
export LC_ALL=C.UTF-8
-export CONTAINER_NAME="ci_mac_native_fuzz" # macos does not use a container, but the env var is needed for logging
export CMAKE_GENERATOR="Ninja"
printf -v BITCOIN_CONFIG "%q " \
-DBUILD_FOR_FUZZING=ON \
### ci/test/00_setup_env_native_alpine_musl.sh
@@ -6,12 +6,10 @@
export LC_ALL=C.UTF-8
-export CONTAINER_NAME=ci_native_alpine_musl
export CI_IMAGE_NAME_TAG="mirror.gcr.io/alpine:3.24"
export CI_BASE_PACKAGES="build-base musl-dev pkgconf curl ccache make ninja git python3-dev py3-pip which patch xz procps rsync util-linux bison e2fsprogs cmake dash linux-headers"
export PIP_PACKAGES="--break-system-packages pyzmq pycapnp"
export DEP_OPTS="DEBUG=1"
-export GOAL="install"
printf -v BITCOIN_CONFIG "%q " \
--preset=dev-mode \
-DREDUCE_EXPORTS=ON \
### ci/test/00_setup_env_native_asan.sh
@@ -18,12 +18,10 @@ else
export CI_CONTAINER_CAP="--cap-add SYS_PTRACE" # If run with (ASan + LSan), the container needs access to ptrace (https://github.com/google/sanitizers/issues/764)
fi
-export CONTAINER_NAME=ci_native_asan
export APT_LLVM_V="23"
export PACKAGES="systemtap-sdt-dev clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev mold python3-zmq qt6-base-dev qt6-tools-dev qt6-l10n-tools libboost-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE} libcapnp-dev capnproto python3-pip"
export PIP_PACKAGES="--break-system-packages pycapnp"
export NO_DEPENDS=1
-export GOAL="install"
export CI_LIMIT_STACK_SIZE=1
printf -v BITCOIN_CONFIG "%q " \
--preset=dev-mode \
### ci/test/00_setup_env_native_chimera_lto.sh
@@ -9,13 +9,11 @@
export LC_ALL=C.UTF-8
-export CONTAINER_NAME=ci_native_chimera_musl
export CI_IMAGE_NAME_TAG="mirror.gcr.io/chimeralinux/chimera"
export CI_BASE_PACKAGES="ccache chimerautils chimerautils-extra clang cmake curl e2fsprogs git gmake gtar linux-headers procps python-devel python-pip rsync util-linux util-linux-lscpu"
export PIP_PACKAGES="--break-system-packages pyzmq pycapnp"
# NO_QT=1 because Qt needs various patches: https://github.com/chimera-linux/cports/tree/master/main/qt6-qtbase/patches
export DEP_OPTS="build_CC=clang build_CXX=clang++ build_TAR=gtar AR=llvm-ar CC=clang CXX=clang++ NM=llvm-nm RANLIB=llvm-ranlib STRIP=llvm-strip NO_QT=1"
-export GOAL="install"
printf -v BITCOIN_CONFIG "%q " \
--preset=dev-mode \
-DBUILD_GUI=OFF \
### ci/test/00_setup_env_native_fuzz.sh
@@ -7,7 +7,6 @@
export LC_ALL=C.UTF-8
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:26.04"
-export CONTAINER_NAME=ci_native_fuzz
export APT_LLVM_V="23"
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev libboost-dev libsqlite3-dev libcapnp-dev capnproto"
export NO_DEPENDS=1
### ci/test/00_setup_env_native_fuzz_with_msan.sh
@@ -13,7 +13,6 @@ export MSAN_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit
LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${LIBCXX_DIR}lib -Wl,-rpath,${LIBCXX_DIR}lib -lc++ -lc++abi -lpthread -Wno-unused-command-line-argument"
export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
-export CONTAINER_NAME="ci_native_fuzz_msan"
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev"
export DEP_OPTS="DEBUG=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
export GOAL="all"
### ci/test/00_setup_env_native_fuzz_with_valgrind.sh
@@ -7,7 +7,6 @@
export LC_ALL=C.UTF-8
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:26.04"
-export CONTAINER_NAME=ci_native_fuzz_valgrind
export PACKAGES="clang llvm libclang-rt-dev libboost-dev libsqlite3-dev valgrind libcapnp-dev capnproto"
export NO_DEPENDS=1
export RUN_UNIT_TESTS=false
### ci/test/00_setup_env_native_iwyu.sh
@@ -7,7 +7,6 @@
export LC_ALL=C.UTF-8
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:26.04" # To build codegen, CMake must be 3.31 or newer.
-export CONTAINER_NAME=ci_native_iwyu
export IWYU_LLVM_V="23"
export APT_LLVM_V="${IWYU_LLVM_V}"
export PACKAGES="clang-${IWYU_LLVM_V} clang-format-${IWYU_LLVM_V} libclang-${IWYU_LLVM_V}-dev llvm-${IWYU_LLVM_V}-dev jq libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev libcapnp-dev capnproto"
### ci/test/00_setup_env_native_msan.sh
@@ -13,11 +13,9 @@ export MSAN_FLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit
LIBCXX_FLAGS="-nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${LIBCXX_DIR}lib -Wl,-rpath,${LIBCXX_DIR}lib -lc++ -lc++abi -lpthread -Wno-unused-command-line-argument"
export MSAN_AND_LIBCXX_FLAGS="${MSAN_FLAGS} ${LIBCXX_FLAGS}"
-export CONTAINER_NAME="ci_native_msan"
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev python3-pip"
export PIP_PACKAGES="--break-system-packages pycapnp pyzmq"
export DEP_OPTS="DEBUG=1 NO_QT=1 CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'"
-export GOAL="install"
export CI_LIMIT_STACK_SIZE=1
printf -v BITCOIN_CONFIG "%q " \
--preset=dev-mode \
### ci/test/00_setup_env_native_nowallet.sh
@@ -6,13 +6,11 @@
export LC_ALL=C.UTF-8
-export CONTAINER_NAME=ci_native_nowallet
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
# Use minimum supported python3.10 (or best-effort 3.12) and clang-17, see doc/dependencies.md
export PACKAGES="python3-zmq python3-pip clang-17 llvm-17 libc++abi-17-dev libc++-17-dev"
export PIP_PACKAGES="--break-system-packages pycapnp"
export DEP_OPTS="NO_WALLET=1 CC=clang-17 CXX='clang++-17 -stdlib=libc++'"
-export GOAL="install"
printf -v BITCOIN_CONFIG "%q " \
--preset=dev-mode \
-DREDUCE_EXPORTS=ON \
### ci/test/00_setup_env_native_previous_releases.sh
@@ -6,14 +6,12 @@
export LC_ALL=C.UTF-8
-export CONTAINER_NAME=ci_native_previous_releases
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:22.04"
# Use minimum supported python3.10 and gcc-12, see doc/dependencies.md
export PACKAGES="gcc-12 g++-12 python3-zmq libleveldb-dev python3-pip"
export DEP_OPTS="CC=gcc-12 CXX=g++-12"
export PIP_PACKAGES="plyvel"
export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
-export GOAL="install"
export CI_LIMIT_STACK_SIZE=1
export DOWNLOAD_PREVIOUS_RELEASES=true
printf -v BITCOIN_CONFIG "%q " \
### ci/test/00_setup_env_native_tidy.sh
@@ -7,7 +7,6 @@
export LC_ALL=C.UTF-8
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:26.04"
-export CONTAINER_NAME=ci_native_tidy
export TIDY_LLVM_V="23"
export APT_LLVM_V="${TIDY_LLVM_V}"
export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev libcapnp-dev capnproto"
@@ -17,7 +16,6 @@ export RUN_FUNCTIONAL_TESTS=false
export RUN_FUZZ_TESTS=false
export RUN_CHECK_DEPS=true
export RUN_TIDY=true
-export GOAL="install"
printf -v BITCOIN_CONFIG "%q " \
--preset dev-mode \
-DCMAKE_C_COMPILER=clang-${TIDY_LLVM_V} \
### ci/test/00_setup_env_native_tsan.sh
@@ -6,15 +6,13 @@
export LC_ALL=C.UTF-8
-export CONTAINER_NAME=ci_native_tsan
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:26.04"
export APT_LLVM_V="23"
LIBCXX_DIR="/cxx_build/"
LIBCXX_FLAGS="-fsanitize=thread -nostdinc++ -nostdlib++ -isystem ${LIBCXX_DIR}include/c++/v1 -L${LIBCXX_DIR}lib -Wl,-rpath,${LIBCXX_DIR}lib -lc++ -lc++abi -lpthread -Wno-unused-command-line-argument"
export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} llvm-${APT_LLVM_V}-dev libclang-${APT_LLVM_V}-dev libclang-rt-${APT_LLVM_V}-dev python3-zmq python3-pip"
export PIP_PACKAGES="--break-system-packages pycapnp"
export DEP_OPTS="CC=clang CXX=clang++ CXXFLAGS='${LIBCXX_FLAGS}' NO_QT=1"
-export GOAL="install"
export CI_LIMIT_STACK_SIZE=1
printf -v BITCOIN_CONFIG "%q " \
--preset=dev-mode \
### ci/test/00_setup_env_native_valgrind.sh
@@ -7,14 +7,12 @@
export LC_ALL=C.UTF-8
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:26.04"
-export CONTAINER_NAME=ci_native_valgrind
export PACKAGES="clang llvm libclang-rt-dev valgrind python3-zmq libboost-dev libzmq3-dev libsqlite3-dev libcapnp-dev capnproto python3-pip"
export PIP_PACKAGES="--break-system-packages pycapnp"
export USE_VALGRIND=1
export NO_DEPENDS=1
# bind tests excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
export TEST_RUNNER_EXTRA="--exclude rpc_bind --exclude feature_bind_extra"
-export GOAL="install"
printf -v BITCOIN_CONFIG "%q " \
--preset=dev-mode \
-DBUILD_GUI=OFF `# GUI disabled, because it only passes with a DEBUG=1 depends build` \
### ci/test/00_setup_env_netbsd_cross.sh
@@ -6,7 +6,6 @@
export LC_ALL=C.UTF-8
-export CONTAINER_NAME=ci_netbsd_cross
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:26.04"
export APT_LLVM_V="23"
export HOST=x86_64-unknown-netbsd
@@ -27,7 +26,6 @@ export DEP_OPTS="build_CC=clang build_CXX=clang++ \
OBJDUMP=llvm-objdump-${APT_LLVM_V} \
RANLIB=llvm-ranlib-${APT_LLVM_V} \
STRIP=llvm-strip-${APT_LLVM_V}"
-export GOAL="install"
printf -v BITCOIN_CONFIG "%q " \
--preset=dev-mode \
-DBUILD_GUI=OFF \
### ci/test/00_setup_env_openbsd_cross.sh
@@ -6,7 +6,6 @@
export LC_ALL=C.UTF-8
-export CONTAINER_NAME=ci_openbsd_cross
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:26.04"
export APT_LLVM_V="23"
export HOST=x86_64-unknown-openbsd
@@ -27,7 +26,6 @@ export DEP_OPTS="NO_QT=1 build_CC=clang build_CXX=clang++ \
OBJDUMP=llvm-objdump-${APT_LLVM_V} \
RANLIB=llvm-ranlib-${APT_LLVM_V} \
STRIP=llvm-strip-${APT_LLVM_V}"
-export GOAL="install"
printf -v BITCOIN_CONFIG "%q " \
--preset=dev-mode \
-DBUILD_GUI=OFF \
### ci/test/00_setup_env_riscv_bare_cross.sh
@@ -6,7 +6,6 @@
export LC_ALL=C.UTF-8
-export CONTAINER_NAME=ci_native_riscv_bare
export GOAL="bitcoin_consensus bitcoin_crypto secp256k1"
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:26.04"
### ci/test/00_setup_env_s390x.sh
@@ -8,13 +8,11 @@ export LC_ALL=C.UTF-8
export HOST=s390x-linux-gnu
export PACKAGES="python3-zmq"
-export CONTAINER_NAME=ci_s390x
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:26.04"
export CI_IMAGE_PLATFORM="linux/s390x"
# bind tests excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547
export TEST_RUNNER_EXTRA="--exclude rpc_bind --exclude feature_bind_extra"
export RUN_FUNCTIONAL_TESTS=true
-export GOAL="install"
printf -v BITCOIN_CONFIG "%q " \
--preset=dev-mode \
-DREDUCE_EXPORTS=ON
### ci/test/00_setup_env_win64.sh
@@ -6,7 +6,6 @@
export LC_ALL=C.UTF-8
-export CONTAINER_NAME=ci_win64
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:26.04"
export HOST=x86_64-w64-mingw32ucrt
export PACKAGES="nix-bin nix-setup-systemd"
### ci/test_run_all.sh
@@ -6,6 +6,5 @@
export LC_ALL=C.UTF-8
-set -o errexit; source ./ci/test/00_setup_env.sh
-set -o errexit
+source ./ci/test/00_setup_env.sh
"./ci/test/02_run_container.py"Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.