From 7dcef9cc29585febae774134a8b8df11622b41ba Mon Sep 17 00:00:00 2001 From: DCG-Claude Date: Sat, 31 Oct 2026 23:08:29 -0500 Subject: [PATCH 1/4] Merge bitcoin/bitcoin#28138: ci: Keep system env vars as-is (bugfix) fabc04a4d96c4fe70e60d365aa28031d149094f3 ci: Keep system env vars as-is (MarcoFalke) fa8dcdcc8b29e58f5d285a49dde33d94b63c893b ci: Set PATH inside the CI env (MarcoFalke) fac229ab1f95ec77f18be8a783a2779dd781c684 ci: Remove P_CI_DIR and --workdir (MarcoFalke) Pull request description: This fixes a bug where the `$PATH` from the host is used inside the container. This will lead to bugs when the `$PATH` is different. For example on a host of Fedora 38, and a container of `debian:bullseye`. This can be tested with the `FILE_ENV=./ci/test/00_setup_env_arm.sh` CI env. On master: ``` Error: crun: executable file `bash` not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found ``` On this pull: (everything passes) ACKs for top commit: TheCharlatan: lgtm ACK fabc04a4d96c4fe70e60d365aa28031d149094f3 Tree-SHA512: 51d2affed91624d0e5b43a3ee1e696313f934e05fde6b5a19e8ac4e6666c1e7b667a444bf3de3f77190bcd00e81efb7576196afb0f6b5e788d1a50e7ddb28d7e Dash adaptations: - ci/test/00_setup_env.sh: new BASE_SCRATCH_DIR comment and BINS_SCRATCH_DIR go where Dash already defines BASE_SCRATCH_DIR (after MAKEJOBS), not next to BASE_ROOT_DIR as upstream - ci/test/00_setup_env.sh: ci/retry PATH export removed as upstream; no Dash consumer of 00_setup_env.sh (ci/dash/*) uses CI_RETRY_EXE, so nothing needs it moved elsewhere Not applicable to Dash (intentionally omitted): - ci/test/04_install.sh: Dash removed this docker env-file pipeline (e9b40c44b2); ci/dash/* passes only explicit -e vars, so host HOME/PATH/USER never leak into the container --- ci/lint/04_install.sh | 2 ++ ci/test/00_setup_env.sh | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ci/lint/04_install.sh b/ci/lint/04_install.sh index 1104966a8540..02005530af72 100755 --- a/ci/lint/04_install.sh +++ b/ci/lint/04_install.sh @@ -6,6 +6,8 @@ export LC_ALL=C +export PATH=$PWD/ci/retry:$PATH + ${CI_RETRY_EXE} apt-get update # Lint dependencies: # - curl/xz-utils (to install shellcheck) diff --git a/ci/test/00_setup_env.sh b/ci/test/00_setup_env.sh index ad0974934be1..42778e93330a 100755 --- a/ci/test/00_setup_env.sh +++ b/ci/test/00_setup_env.sh @@ -25,9 +25,12 @@ export JOB_NUMBER=${JOB_NUMBER:-1} echo "Fallback to default values in env (if not yet set)" # The number of parallel jobs to pass down to make and test_runner.py export MAKEJOBS=${MAKEJOBS:--j$(nproc)} -# A folder for the ci system to put temporary files (ccache, datadirs for tests, ...) -# This folder only exists on the ci host. +# A folder for the ci system to put temporary files (build result, datadirs for tests, ...) +# This folder only exists on the ci guest. export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch} +# A folder for the ci system to put executables. +# This folder only exists on the ci guest. +export BINS_SCRATCH_DIR="${BASE_SCRATCH_DIR}/bins/" # What host to compile for. See also ./depends/README.md # Tests that need cross-compilation export the appropriate HOST. # Tests that run natively guess the host @@ -81,7 +84,6 @@ export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks} export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps} export GOAL=${GOAL:-install} export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets} -export PATH=${BASE_ROOT_DIR}/ci/retry:$PATH export CI_RETRY_EXE=${CI_RETRY_EXE:-"retry --"} # Dash's Docker-specifics export BUILDER_IMAGE_NAME="dash-builder-$BUILD_TARGET-$JOB_NUMBER" From ce6c50e25a2e7d7ac977d73f53808a155337aeed Mon Sep 17 00:00:00 2001 From: DCG-Claude Date: Sat, 31 Oct 2026 23:09:00 -0500 Subject: [PATCH 2/4] Merge bitcoin/bitcoin#28187: ci: Run "macOS native x86_64" job on GitHub Actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 9658d0dc17c270138523c41a982425e276b24271 ci: Run "macOS native x86_64" job on GitHub Actions (Hennadii Stepanov) Pull request description: From https://github.com/bitcoin/bitcoin/issues/28098: > Thus, someone would have to sponsor an amount of roughly 5kUSD/mo for those two tasks. > If the goal is to stay on a free plan, I think the only option is GitHub Actions CI. --- **IMPORTANT NOTE**. We currently ship macOS release binaries for both architectures: `x86_64` and `arm64`. If this PR gets merged, only `x86_64` architecture will be tested on CI, which implies some [drawbacks](https://github.com/bitcoin/bitcoin/pull/28187#issuecomment-1658077549). However, it has never been the case that our CI tested both architectures simultaneously. And we hope that GitHub Actions will soon host macOS `arm64` runners. Historically, we moved from `x86_64` to `arm64` in https://github.com/bitcoin/bitcoin/pull/26388 less than a year ago. --- Security concerns: - https://github.com/bitcoin/bitcoin/issues/28098#issuecomment-1651432106 - https://github.com/bitcoin/bitcoin/issues/28098#issuecomment-1651688197 `GITHUB_TOKEN` permissions (from the build log in my personal repo): ``` 2023-07-27T07:30:17.8313534Z ##[group]GITHUB_TOKEN Permissions 2023-07-27T07:30:17.8314113Z Contents: read 2023-07-27T07:30:17.8314608Z Metadata: read 2023-07-27T07:30:17.8314957Z Packages: read 2023-07-27T07:30:17.8315233Z ##[endgroup] ``` Comparison of resources: | Resource | Current, Cirrus CI | Suggested, GitHub Actions | |---|:-:|:-:| | CPU | 4 | 4 \*\* | | RAM, GB | 8 | 14 | **\*\* NOTE**: However, [docs](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources) are mentioning: > 3-core CPU (x86_64) ACKs for top commit: MarcoFalke: re-ACK 9658d0dc17c270138523c41a982425e276b24271 🏂 achow101: ACK 9658d0dc17c270138523c41a982425e276b24271 jarolrod: ACK 9658d0dc17c270138523c41a982425e276b24271 Tree-SHA512: 6123e68e6784cdf4e53c3e77b435709261db21f09091af2c22e667d3816a305fffb9d617297a5bc1bda18aaba84a6e210cec6a75c52afa7746a3780a67b69865 Dash adaptations: - ci/test/00_setup_env_mac_native.sh: renamed from the arm64 file with HOST=x86_64-apple-darwin and CCACHE_MAXSIZE=400M; Dash's CONTAINER_NAME=ci_macos and --disable-miner are kept - .github/workflows/ci.yml: not added; Dash runs CI through build.yml and ci/dash/matrix.sh, has no native macOS job, and ci/test_run_all.sh, which this workflow calls, was removed from Dash Not applicable to Dash (intentionally omitted): - .cirrus.yml: Dash removed .cirrus.yml (dashpay/dash#6704); the Cirrus macOS arm64 task this hunk deletes never existed in Dash - .github/workflows/ci.yml: Bitcoin's GitHub Actions macOS job calls ci/test_run_all.sh, which Dash removed (e9b40c44b2); Dash's GHA CI is build.yml + ci/dash/*.sh and has no native macOS job --- ...p_env_mac_native_arm64.sh => 00_setup_env_mac_native.sh} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename ci/test/{00_setup_env_mac_native_arm64.sh => 00_setup_env_mac_native.sh} (78%) diff --git a/ci/test/00_setup_env_mac_native_arm64.sh b/ci/test/00_setup_env_mac_native.sh similarity index 78% rename from ci/test/00_setup_env_mac_native_arm64.sh rename to ci/test/00_setup_env_mac_native.sh index d9265c8333cc..9241fe348f55 100755 --- a/ci/test/00_setup_env_mac_native_arm64.sh +++ b/ci/test/00_setup_env_mac_native.sh @@ -1,17 +1,17 @@ #!/usr/bin/env bash # -# Copyright (c) 2019-2022 The Bitcoin Core developers +# Copyright (c) 2019-present 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 export CONTAINER_NAME=ci_macos -export HOST=arm64-apple-darwin +export HOST=x86_64-apple-darwin export PIP_PACKAGES="zmq" export GOAL="install" export BITCOIN_CONFIG="--with-gui --with-miniupnpc --with-natpmp --enable-reduce-exports --disable-miner" export CI_OS_NAME="macos" export NO_DEPENDS=1 export OSX_SDK="" -export CCACHE_MAXSIZE=300M +export CCACHE_MAXSIZE=400M From c8407a8e57eb557be98b56de179fdbe26fa17afc Mon Sep 17 00:00:00 2001 From: DCG-Claude Date: Sat, 31 Oct 2026 23:09:29 -0500 Subject: [PATCH 3/4] Merge bitcoin/bitcoin#28353: ci: Remove /ro_base bind mount, Remove LC_ALL=C from s390x task fa70cbd9693b0ccc56114647f0817c96b2f223ee ci: Remove unused TEST_RUNNER_ENV="LC_ALL=C" from s390x task (MarcoFalke) fa33354dcb6f289965e84a0cd4492c43dafd917b ci: Remove /ro_base bind mount (MarcoFalke) fa0df9d4c4cb93b0971f92f3fe6f9a1deb5b311f doc: Remove sudo from command that is already run as root (MarcoFalke) Pull request description: Remove some CI stuff no longer needed. ACKs for top commit: fanquake: ACK fa70cbd9693b0ccc56114647f0817c96b2f223ee - did not test the s390x job. Tree-SHA512: 3a6ed0cfc855a92c2f834e59494c0a19a5647510247aece5e40a1aa78074894fe7454e684a1ea1f8f0662c50ac1caf2e390398b0fcfbf81544e6488fa9b8915e Dash adaptations: - ci/test/00_setup_env_s390x.sh: only the copyright bump applies; Dash's file never had TEST_RUNNER_ENV="LC_ALL=C" (or the CI_IMAGE_NAME_TAG context line), so nothing to remove Not applicable to Dash (intentionally omitted): - .cirrus.yml: Dash removed .cirrus.yml (#6704); the hunk only edits a swapfile setup comment with no Dash counterpart - ci/test/04_install.sh: Dash removed the staged Bitcoin Core CI pipeline (e9b40c44b2); Dash's GHA-based ci/dash scripts have no /ro_base bind mount or docker run --- ci/test/00_setup_env_s390x.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/test/00_setup_env_s390x.sh b/ci/test/00_setup_env_s390x.sh index 51ca6e3beeff..6f6b0f6c14d1 100755 --- a/ci/test/00_setup_env_s390x.sh +++ b/ci/test/00_setup_env_s390x.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2019-2022 The Bitcoin Core developers +# Copyright (c) 2019-present The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. From 34f8fb47ad769f9aedbfd32749a72ac1f11dee24 Mon Sep 17 00:00:00 2001 From: DCG-Claude Date: Sat, 31 Oct 2026 23:09:54 -0500 Subject: [PATCH 4/4] Merge bitcoin/bitcoin#27976: ci: Start with clean env fa15f7e082396089f0945b53b60cf3ce952e9794 ci: Remove no longer applicable section (MarcoFalke) fa378bed56db66119b7f5847b749c4900b04c0a1 ci: Start with clean env (MarcoFalke) fa8c250c2f6b43f828020a35a8ee4262755c39ed ci: Limit scope of some env vars (MarcoFalke) Pull request description: Starting with a clean `env` should help to avoid non-determinism, such as the one fixed in https://github.com/bitcoin/bitcoin/pull/27739#issuecomment-1564529747 ACKs for top commit: dergoegge: utACK fa15f7e082396089f0945b53b60cf3ce952e9794 Tree-SHA512: 716b264217557b6524dab92d5a2a8d61ecb982dff475bd0cf5a763070b4c5916cd5995e764eb5d67d9cf2428c29d5fc2f42b32941b54c7c3053123ce448171e5 Dash adaptations: - ci/test/00_setup_env.sh: SDK_URL removed from Dash's rewritten defaults block; Dash's releases/$HOST, DOCKER_PACKAGES and Docker-specific lines kept - ci/test/00_setup_env_mac.sh: SDK_URL moved here as upstream does; applied cleanly - ci/README.md: Dash's README is kept unchanged; it has no local-run section and no test_run_all.sh to wrap in a clean env Not applicable to Dash (intentionally omitted): - ci/README.md: Dash removed the 'Running a Stage Locally' section and has no ci/test_run_all.sh, so there is no command to wrap in env -i - ci/README.md: The 'no FILE_ENV' text upstream drops is already gone in Dash; its 'values left out' fallback sentence still holds, since matrix.sh always picks a FILE_ENV - ci/test/04_install.sh: Dash deleted 04_install.sh; Dash sets the sanitizer options in ci/dash/matrix.sh, not in an install step - ci/test/06_script_b.sh: Dash deleted 06_script_b.sh; ci/dash/matrix.sh already sets the *SAN_OPTIONS and is sourced only by build, test and lint steps --- ci/test/00_setup_env.sh | 1 - ci/test/00_setup_env_mac_cross.sh | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/test/00_setup_env.sh b/ci/test/00_setup_env.sh index 42778e93330a..e71b490a4018 100755 --- a/ci/test/00_setup_env.sh +++ b/ci/test/00_setup_env.sh @@ -80,7 +80,6 @@ export BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build-ci} # The folder for previous release binaries. # This folder exists only on the ci guest, and on the ci host as a volume. export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/releases/$HOST} -export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks} export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps} export GOAL=${GOAL:-install} export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets} diff --git a/ci/test/00_setup_env_mac_cross.sh b/ci/test/00_setup_env_mac_cross.sh index 5b1dd742a525..d50b906b6758 100755 --- a/ci/test/00_setup_env_mac_cross.sh +++ b/ci/test/00_setup_env_mac_cross.sh @@ -6,6 +6,8 @@ export LC_ALL=C.UTF-8 +export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks} + export CONTAINER_NAME=ci_macos_cross export HOST=x86_64-apple-darwin export PACKAGES="clang cmake lld llvm zip"