Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/build-src.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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

Expand Down
7 changes: 6 additions & 1 deletion ci/dash/build_src.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions ci/dash/test_integrationtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion ci/dash/test_unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions ci/test/00_setup_env_native_asan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

@thepastaclaw thepastaclaw Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Resolved at adfd4af1; see the replies below.

🔴 Blocking: Honor NO_DEPENDS in test-time library selection

Enabling NO_DEPENDS switches compilation to system libraries, but ci/dash/test_unittests.sh:20 still unconditionally exports LD_LIBRARY_PATH="$DEPENDS_DIR/$HOST/lib". When that prefix exists, the system Qt dependency chain loads depends' older FreeType instead of the distribution library. This is confirmed in ASan job 130393139752: at 08:22:27 it exports the depends library path, and at 08:23:25 test_dash-qt fails with /lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined symbol: FT_Get_Color_Glyph_ClipBox, exiting 127 and failing the job. The pull_request_target workflow still reconstructs depends from the base workflow while checking out this head's scripts; an existing local prefix creates the same problem. Guard the unit-test runtime override with NO_DEPENDS, and update both the export at ci/dash/test_integrationtests.sh:21 and its inline assignment at line 52. System-library tests must not depend on the depends prefix being absent.

source: gpt-6.1-sol (phase2-reviewer: general, dash-core-commit-history); fresh:general

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved (re-reviewed at adfd4af1): The new NO_DEPENDS guards in both test scripts preserve the normal library-search environment for the system build, and removing the functional runner's unconditional override closes the remaining assignment. Depends-backed jobs retain their previous exported library path.

export TEST_RUNNER_EXTRA="--timeout-factor=4 -j4" # Increase timeout because sanitizers slow down
export CI_LIMIT_STACK_SIZE=1
export GOAL="install"
Expand Down
6 changes: 6 additions & 0 deletions contrib/containers/ci/ci-slim.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
21 changes: 21 additions & 0 deletions contrib/containers/ci/ci.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Comment on lines +42 to +50

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Suggestion: Guard the second blst pin against dependency drift

The Dockerfile now independently records blst's version, checksum, and build flags, which already have an owner in depends/packages/blst.mk. These values match today, but the synchronization comment does not detect a later update made in only one location. That would silently make the system-library job exercise a different blst revision from depends-based builds. Add a lightweight consistency check for the duplicated version, checksum, and relevant flags, or derive them from shared metadata. The omitted no_asm_limbs.patch is not a current build defect: it affects BLST_NO_ASM, which this native amd64/arm64 installation does not select; document that intentional distinction rather than requiring identical patch application.

source: muse-spark-1.3-contributor (phase1-reviewer: general)

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
Comment on lines +40 to +53

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thepastaclaw please make an issue tracking this; we want to move blst into a git subtree or similiar to avoid this type of issue

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracking issue opened: #8144. It covers moving blst into a git subtree or equivalent repository-owned shared source so the depends build and system-library CI image no longer maintain independent pins.


# 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; \
Expand Down
Loading