From af3a545dcd05544b513d947870dafcea54a82dfe Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Thu, 5 Nov 2026 16:40:20 +0700 Subject: [PATCH] ci: build wallet code with the oldest and newest gcc, drop the sqlite job The linux64_sqlite job no longer adds coverage: since the asan job dropped Berkeley DB, both build a sqlite-only wallet, and both take the shared linux64 depends, so the sqlite job's own DEP_OPTS were never applied. Its only unique property was gcc-11, the oldest supported GCC. At the same time no job compiled wallet code with the newest GCC: gcc-14 was used only by the nowallet job, so new gcc-14 warnings in src/wallet/ would pass CI. Move gcc-11 to the linux64 (previous_releases) job, which keeps its shared depends unchanged, and build the aarch64 cross job and its depends with gcc-14. Then remove the redundant linux64_sqlite job. Noble has no g++-11-aarch64-linux-gnu for arm64, so the arm64 CI image failed to build. There the native g++-11 already provides aarch64-linux-gnu-g++-11; install the cross package on amd64 only. --- .github/workflows/build.yml | 32 ++----------------- ci/README.md | 2 +- ci/dash/matrix.sh | 2 -- ci/test/00_setup_env_aarch64.sh | 5 +-- .../00_setup_env_native_previous_releases.sh | 2 +- ci/test/00_setup_env_native_sqlite.sh | 13 -------- contrib/containers/ci/ci.Dockerfile | 8 +++++ 7 files changed, 15 insertions(+), 49 deletions(-) delete mode 100755 ci/test/00_setup_env_native_sqlite.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6381e0645742..e30687d774d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -234,8 +234,7 @@ jobs: if: | vars.SKIP_LINUX64 == '' || vars.SKIP_LINUX64_ASAN == '' || - vars.SKIP_LINUX64_FUZZ == '' || - vars.SKIP_LINUX64_SQLITE == '' + vars.SKIP_LINUX64_FUZZ == '' with: build-target: linux64 container-path: ${{ needs.container.outputs.path }} @@ -404,21 +403,6 @@ jobs: runs-on: ${{ needs.check-skip.outputs['runner-build'] }} secrets: *remote-ccache-auth - src-linux64_sqlite: - name: linux64_sqlite-build - uses: ./.github/workflows/build-src.yml - needs: [check-skip, container, depends-linux64] - if: ${{ vars.SKIP_LINUX64_SQLITE == '' }} - with: - build-target: linux64_sqlite - 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 - src-linux64_tsan: name: linux64_tsan-build uses: ./.github/workflows/build-src.yml @@ -596,18 +580,6 @@ jobs: runs-on: ${{ needs.check-skip.outputs['runner-build'] }} cancel-stale: ${{ needs.src-linux64_nowallet.outputs.freshness == 'current' && needs.lint.outputs.freshness == 'current' }} - test-linux64_sqlite: - name: linux64_sqlite-test - uses: ./.github/workflows/test-src.yml - needs: [check-skip, container-slim, src-linux64_sqlite, lint] - if: needs.src-linux64_sqlite.outputs.freshness != 'superseded' && needs.lint.outputs.freshness != 'superseded' - with: - bundle-key: ${{ needs.src-linux64_sqlite.outputs.key }} - build-target: linux64_sqlite - container-path: ${{ needs.container-slim.outputs.path }} - runs-on: ${{ needs.check-skip.outputs['runner-build'] }} - cancel-stale: ${{ needs.src-linux64_sqlite.outputs.freshness == 'current' && needs.lint.outputs.freshness == 'current' }} - test-linux64_tsan: name: linux64_tsan-test uses: ./.github/workflows/test-src.yml @@ -624,7 +596,7 @@ jobs: name: Prune old ccache generations # Each develop push saves a new ccache/ctcache entry per target; keep only # the newest so the 10 GB repository cache stops evicting fresh ones. - needs: [src-aarch64-linux, src-linux64, src-linux64_asan, src-linux64_fuzz, src-linux64_multiprocess, src-linux64_nowallet, src-linux64_sqlite, src-linux64_tsan, src-mac, src-win64, lint-multiprocess] + needs: [src-aarch64-linux, src-linux64, src-linux64_asan, src-linux64_fuzz, src-linux64_multiprocess, src-linux64_nowallet, src-linux64_tsan, src-mac, src-win64, lint-multiprocess] if: | !cancelled() && github.event_name == 'push' && diff --git a/ci/README.md b/ci/README.md index e81e71f5171b..d06a2b8f98fa 100644 --- a/ci/README.md +++ b/ci/README.md @@ -34,7 +34,7 @@ and steps, so required checks are unchanged. | Tier | Jobs | Label variable | | --- | --- | --- | | fast | lint, cppcheck, cache-sources, the amd64 pull request container builds and manifests, and the `linux64` depends, build and test | `RUNNER_SELFHOSTED_FAST` | -| build | every other amd64 depends, build and test job (`aarch64-linux`, `linux64_asan`, `linux64_fuzz`, `linux64_nowallet`, `linux64_sqlite`, `mac`, `win64`) | `RUNNER_SELFHOSTED_BUILD` | +| build | every other amd64 depends, build and test job (`aarch64-linux`, `linux64_asan`, `linux64_fuzz`, `linux64_nowallet`, `mac`, `win64`) | `RUNNER_SELFHOSTED_BUILD` | Each tier picks the first of these that applies: diff --git a/ci/dash/matrix.sh b/ci/dash/matrix.sh index 8949ae17fcaa..04c39965191f 100755 --- a/ci/dash/matrix.sh +++ b/ci/dash/matrix.sh @@ -30,8 +30,6 @@ elif [ "$BUILD_TARGET" = "linux64_multiprocess" ]; then source ./ci/test/00_setup_env_native_multiprocess.sh elif [ "$BUILD_TARGET" = "linux64_nowallet" ]; then source ./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh -elif [ "$BUILD_TARGET" = "linux64_sqlite" ]; then - source ./ci/test/00_setup_env_native_sqlite.sh elif [ "$BUILD_TARGET" = "linux64_tsan" ]; then source ./ci/test/00_setup_env_native_tsan.sh elif [ "$BUILD_TARGET" = "linux64_valgrind" ]; then diff --git a/ci/test/00_setup_env_aarch64.sh b/ci/test/00_setup_env_aarch64.sh index d1edb9b95f38..40906d17e471 100755 --- a/ci/test/00_setup_env_aarch64.sh +++ b/ci/test/00_setup_env_aarch64.sh @@ -11,7 +11,7 @@ export HOST=aarch64-linux-gnu # If the host is arm64 and wants to run the tests natively, it can set QEMU_USER_CMD to the empty string. if [ -z ${QEMU_USER_CMD+x} ]; then export QEMU_USER_CMD="${QEMU_USER_CMD:-"qemu-aarch64 -L /usr/aarch64-linux-gnu/"}"; fi export DPKG_ADD_ARCH="arm64" -export PACKAGES="python3-zmq g++-aarch64-linux-gnu busybox libc6:arm64 libstdc++6:arm64 libfontconfig1:arm64 libxcb1:arm64" +export PACKAGES="python3-zmq g++-11-aarch64-linux-gnu busybox libc6:arm64 libstdc++6:arm64 libfontconfig1:arm64 libxcb1:arm64" if [ -n "$QEMU_USER_CMD" ]; then # Likely cross-compiling, so install the needed gcc and qemu-user export PACKAGES="$PACKAGES qemu-user" @@ -23,4 +23,5 @@ export USE_BUSY_BOX=true export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false export GOAL="install" -export BITCOIN_CONFIG="--enable-reduce-exports" +export DEP_OPTS="CC=aarch64-linux-gnu-gcc-11 CXX=aarch64-linux-gnu-g++-11" +export BITCOIN_CONFIG="--enable-reduce-exports CC=aarch64-linux-gnu-gcc-11 CXX=aarch64-linux-gnu-g++-11" diff --git a/ci/test/00_setup_env_native_previous_releases.sh b/ci/test/00_setup_env_native_previous_releases.sh index a2677324721a..6038c5fdf943 100755 --- a/ci/test/00_setup_env_native_previous_releases.sh +++ b/ci/test/00_setup_env_native_previous_releases.sh @@ -15,5 +15,5 @@ export RUN_UNIT_TESTS_SEQUENTIAL="true" export RUN_UNIT_TESTS="false" export GOAL="install" export DOWNLOAD_PREVIOUS_RELEASES="true" -export BITCOIN_CONFIG="--enable-zmq --with-libs=no --enable-reduce-exports CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE -DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION' LDFLAGS=-static-libstdc++" +export BITCOIN_CONFIG="--enable-zmq --with-libs=no --enable-reduce-exports CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE -DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION' LDFLAGS=-static-libstdc++ CC=gcc-14 CXX=g++-14" export RUN_STDLIB_PATH_CHECK=true diff --git a/ci/test/00_setup_env_native_sqlite.sh b/ci/test/00_setup_env_native_sqlite.sh deleted file mode 100755 index 8af6d3fd9ae9..000000000000 --- a/ci/test/00_setup_env_native_sqlite.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2019 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_native_sqlite -export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev" -export DEP_OPTS="NO_BDB=1 NO_UPNP=1 DEBUG=1" -export GOAL="install" -export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --with-sqlite --without-bdb CC=gcc-11 CXX=g++-11" diff --git a/contrib/containers/ci/ci.Dockerfile b/contrib/containers/ci/ci.Dockerfile index e73be67c7dfc..7ae90ade1bc8 100644 --- a/contrib/containers/ci/ci.Dockerfile +++ b/contrib/containers/ci/ci.Dockerfile @@ -31,6 +31,14 @@ RUN set -ex; \ zip \ && rm -rf /var/lib/apt/lists/* +# 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; \ + if [ "$(dpkg --print-architecture)" = "amd64" ]; then \ + apt-get update && apt-get install ${APT_ARGS} g++-11-aarch64-linux-gnu \ + && rm -rf /var/lib/apt/lists/*; \ + fi + # ccache from upstream rather than apt: remote storage over HTTPS needs a # storage helper, which ccache supports from 4.13 (noble ships 4.9.1). ARG TARGETARCH