From 79410402324a7b9364fd813048d3ed766dbb6ffc Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Wed, 11 Nov 2026 13:49:55 +0700 Subject: [PATCH 1/4] ci: add system libraries and blst to the CI images Install the libraries dashd links at runtime in the slim image, where the tests run, and the build-only ones (Boost, Qt, qrencode, sys/sdt.h) in the build image. No distribution packages blst in Ubuntu, so the build image compiles it from the same tarball and with the same flags as depends. --- contrib/containers/ci/ci-slim.Dockerfile | 6 ++++++ contrib/containers/ci/ci.Dockerfile | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/contrib/containers/ci/ci-slim.Dockerfile b/contrib/containers/ci/ci-slim.Dockerfile index 1d2585242124..a4aa61b90d12 100644 --- a/contrib/containers/ci/ci-slim.Dockerfile +++ b/contrib/containers/ci/ci-slim.Dockerfile @@ -44,10 +44,16 @@ RUN set -ex; \ git \ jq \ libbz2-dev \ + libevent-dev \ + libgmp-dev \ liblzma-dev \ + libminiupnpc-dev \ + libnatpmp-dev \ libreadline-dev \ libsqlite3-dev \ libssl-dev \ + libzmq3-dev \ + libzstd-dev \ make \ parallel \ xz-utils \ diff --git a/contrib/containers/ci/ci.Dockerfile b/contrib/containers/ci/ci.Dockerfile index 60cff55957d2..0a06883f5853 100644 --- a/contrib/containers/ci/ci.Dockerfile +++ b/contrib/containers/ci/ci.Dockerfile @@ -23,14 +23,35 @@ RUN set -ex; \ g++-x86-64-linux-gnu \ gawk \ gettext \ + libboost-dev \ + libqrencode-dev \ libtool \ m4 \ pkg-config \ + qtbase5-dev \ + qttools5-dev \ + qttools5-dev-tools \ + systemtap-sdt-dev \ wine-stable \ wine64 \ zip \ && rm -rf /var/lib/apt/lists/* +# No distribution packages blst, so builds that take their libraries from the +# system instead of depends (NO_DEPENDS=1) find it here. +# Keep the version in sync with depends/packages/blst.mk. +ARG BLST_VERSION=0.3.17 +ARG BLST_SHA256=c3fef37b566b67419703b2bbb648e15176276af9a880c22aa8f5f2e8cecc2e4d +RUN set -ex; \ + curl -fL "https://github.com/supranational/blst/archive/refs/tags/v${BLST_VERSION}.tar.gz" -o /tmp/blst.tar.gz; \ + echo "${BLST_SHA256} /tmp/blst.tar.gz" | sha256sum -c -; \ + mkdir /tmp/blst && tar -xzf /tmp/blst.tar.gz -C /tmp/blst --strip-components=1; \ + cd /tmp/blst; \ + CFLAGS="-O2 -fno-builtin -fPIC -D__BLST_PORTABLE__" ./build.sh; \ + install -m 644 bindings/blst.h bindings/blst_aux.h /usr/local/include; \ + install -m 644 libblst.a /usr/local/lib; \ + cd / && rm -rf /tmp/blst /tmp/blst.tar.gz + # Native g++-11 already provides aarch64-linux-gnu-g++-11 on arm64, where noble # has no g++-11-aarch64-linux-gnu cross package RUN set -ex; \ From 88c4c27af45b981f0323606373709aca810beec4 Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Wed, 11 Nov 2026 13:49:55 +0700 Subject: [PATCH 2/4] ci: honour NO_DEPENDS in build_src.sh Three env files set NO_DEPENDS=1, but nothing reads it: configure is always given the depends prefix. Pass that prefix only when NO_DEPENDS is unset and install into the output directory otherwise. --- ci/dash/build_src.sh | 7 ++++++- ci/dash/test_integrationtests.sh | 6 ++++-- ci/dash/test_unittests.sh | 4 +++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ci/dash/build_src.sh b/ci/dash/build_src.sh index 6934b71399e8..a705d10edda7 100755 --- a/ci/dash/build_src.sh +++ b/ci/dash/build_src.sh @@ -19,7 +19,12 @@ if [ -n "$CONFIG_SHELL" ]; then export CONFIG_SHELL="$CONFIG_SHELL" fi -BITCOIN_CONFIG_ALL="--enable-external-signer --disable-dependency-tracking --prefix=$DEPENDS_DIR/$HOST --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib" +BITCOIN_CONFIG_ALL="--enable-external-signer --disable-dependency-tracking --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib" +if [ -z "$NO_DEPENDS" ]; then + BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --prefix=$DEPENDS_DIR/$HOST" +else + BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --prefix=$BASE_OUTDIR" +fi if [ -z "$NO_WERROR" ]; then BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-werror" fi diff --git a/ci/dash/test_integrationtests.sh b/ci/dash/test_integrationtests.sh index 4b114472693d..e4698f53da13 100755 --- a/ci/dash/test_integrationtests.sh +++ b/ci/dash/test_integrationtests.sh @@ -18,7 +18,9 @@ if [ "$RUN_FUNCTIONAL_TESTS" != "true" ]; then exit 0 fi -export LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib +if [ -z "$NO_DEPENDS" ]; then + export LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib +fi if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then echo "Downloading previous releases..." @@ -49,7 +51,7 @@ EXTRA_ARGS="--dashd-arg=-socketevents=$SOCKETEVENTS" set +e # shellcheck disable=SC2086 -LD_LIBRARY_PATH="$DEPENDS_DIR/$HOST/lib" ./test/functional/test_runner.py --ci --attempts=3 --ansi --combinedlogslen=4000 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" ${TEST_RUNNER_EXTRA} --failfast --nocleanup --tmpdir="$(pwd)/testdatadirs" $PASS_ARGS $EXTRA_ARGS +./test/functional/test_runner.py --ci --attempts=3 --ansi --combinedlogslen=4000 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" ${TEST_RUNNER_EXTRA} --failfast --nocleanup --tmpdir="$(pwd)/testdatadirs" $PASS_ARGS $EXTRA_ARGS RESULT=$? set -e diff --git a/ci/dash/test_unittests.sh b/ci/dash/test_unittests.sh index 4ab837c0cdc3..0c33ebbd8655 100755 --- a/ci/dash/test_unittests.sh +++ b/ci/dash/test_unittests.sh @@ -17,7 +17,9 @@ if [ "$RUN_UNIT_TESTS" != "true" ] && [ "$RUN_UNIT_TESTS_SEQUENTIAL" != "true" ] fi export BOOST_TEST_RANDOM="${BOOST_TEST_RANDOM:-1}" -export LD_LIBRARY_PATH="$DEPENDS_DIR/$HOST/lib" +if [ -z "$NO_DEPENDS" ]; then + export LD_LIBRARY_PATH="$DEPENDS_DIR/$HOST/lib" +fi export WINEDEBUG=fixme-all export BOOST_TEST_LOG_LEVEL=test_suite From 092001dc859e3352765b7558cf6f8d9fdf2f9270 Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Wed, 11 Nov 2026 13:49:55 +0700 Subject: [PATCH 3/4] ci: let build-src.yml run without depends The workflow requires a depends cache key and fails if the cache cannot be restored, so a target that builds against system libraries cannot use it. Make the depends inputs optional and skip the depends steps when no key is passed. --- .github/workflows/build-src.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-src.yml b/.github/workflows/build-src.yml index 833b2482c5d6..86f330cdc19f 100644 --- a/.github/workflows/build-src.yml +++ b/.github/workflows/build-src.yml @@ -12,13 +12,15 @@ on: required: true type: string depends-key: - description: "Key needed to access cached depends" - required: true + description: "Key needed to access cached depends; empty builds against system libraries" + required: false type: string + default: "" depends-host: description: "Host triplet from depends build" - required: true + required: false type: string + default: "" depends-dep-opts: description: "DEP_OPTS used to build depends" required: false @@ -81,6 +83,7 @@ jobs: - name: Restore depends cache id: depends-cache + if: inputs.depends-key != '' uses: actions/cache/restore@v5 with: path: depends/built/${{ inputs.depends-host }} @@ -91,20 +94,21 @@ jobs: # have read-only cache tokens (GitHub change, June 2026), so freshly # built depends arrive as an artifact instead of a cache entry. Also # covers trusted runs whose cache save was denied (save only warns). - if: steps.depends-cache.outputs.cache-hit != 'true' && inputs.depends-artifact != '' + if: inputs.depends-key != '' && steps.depends-cache.outputs.cache-hit != 'true' && inputs.depends-artifact != '' uses: actions/download-artifact@v8 with: name: ${{ inputs.depends-artifact }} path: depends/built/${{ inputs.depends-host }} - name: Check built depends are present - if: steps.depends-cache.outputs.cache-hit != 'true' && inputs.depends-artifact == '' + if: inputs.depends-key != '' && steps.depends-cache.outputs.cache-hit != 'true' && inputs.depends-artifact == '' run: | echo "::error::Depends cache restore missed and no built depends artifact was provided" exit 1 shell: bash - name: Rebuild depends prefix + if: inputs.depends-key != '' env: DEPENDS_HOST: ${{ inputs.depends-host }} DEP_OPTS: ${{ inputs.depends-dep-opts }} From 2996e51a8ac17edb6e88602753fe13fb6e30e5c9 Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Wed, 11 Nov 2026 13:49:56 +0700 Subject: [PATCH 4/4] ci: build linux64_asan against system libraries Bitcoin Core runs its ASan job with no depends and it helps to cover a build without depends. This scenario had been untested by Dash Core CI. With this commit the configure paths that detect system libraries are tested. libbacktrace is not packaged for Ubuntu noble, so this job builds without stack traces. --- .github/workflows/build.yml | 10 ++-------- ci/test/00_setup_env_native_asan.sh | 3 +-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1373fac71bea..5cfc0fed22a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -235,9 +235,7 @@ jobs: name: x86_64-pc-linux-gnu uses: ./.github/workflows/build-depends.yml needs: [check-skip, container, cache-sources] - if: | - vars.SKIP_LINUX64_ASAN == '' || - vars.SKIP_LINUX64_FUZZ == '' + if: ${{ vars.SKIP_LINUX64_FUZZ == '' }} with: build-target: linux64 container-path: ${{ needs.container.outputs.path }} @@ -365,15 +363,11 @@ jobs: src-linux64_asan: name: linux64_asan-build uses: ./.github/workflows/build-src.yml - needs: [check-skip, container, depends-linux64] + needs: [check-skip, container] if: ${{ vars.SKIP_LINUX64_ASAN == '' }} with: build-target: linux64_asan container-path: ${{ needs.container.outputs.path }} - depends-key: ${{ needs.depends-linux64.outputs.key }} - depends-host: ${{ needs.depends-linux64.outputs.host }} - depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }} - depends-artifact: ${{ needs.depends-linux64.outputs.built-artifact }} runs-on: ${{ needs.check-skip.outputs['runner-build'] }} secrets: *remote-ccache-auth diff --git a/ci/test/00_setup_env_native_asan.sh b/ci/test/00_setup_env_native_asan.sh index 8ef5e217aeee..e4c6e68dce4f 100755 --- a/ci/test/00_setup_env_native_asan.sh +++ b/ci/test/00_setup_env_native_asan.sh @@ -8,8 +8,7 @@ export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_native_asan export PACKAGES="clang-19 llvm-19 libclang-rt-19-dev python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev libboost-dev libminiupnpc-dev libzmq3-dev libqrencode-dev" -# Reuses the depends built for the linux64 target, which uses the defaults. -export DEP_OPTS="" +export NO_DEPENDS=1 export TEST_RUNNER_EXTRA="--timeout-factor=4 -j4" # Increase timeout because sanitizers slow down export CI_LIMIT_STACK_SIZE=1 export GOAL="install"