From 7cd3beed0fd4505bf62cbe6ac420801031b9a7d5 Mon Sep 17 00:00:00 2001 From: PastaClaw Date: Mon, 16 Mar 2026 15:47:15 -0500 Subject: [PATCH] ci: migrate primary CI jobs to ARM runners Move the primary linux64 path to ARM runners, making aarch64 the default native architecture for the main linux64, fuzz, sqlite, and nowallet lanes. The shared linux64 depends cache now feeds the main, fuzz, and sqlite ARM jobs, while nowallet builds its own no-wallet ARM depends cache and runs build+test natively on arm64. Keep a few lanes on x86 for now: - multiprocess (build + test): the normal lane was unstable on arm64 during validation, so keep the non-TSAN multiprocess path on amd64 for now while TSAN remains on ARM - ubsan (build + test) - linux64_x86canary (build + test): x86 smoke coverage - mac, win64: cross-compile targets - lint: architecture-independent Drop the aarch64-linux cross-compile job (depends + src) and its setup env script since we don't ship arm-linux-gnueabihf binaries and now have native aarch64 coverage through the migrated jobs. Move HOST detection into 00_setup_env.sh so native targets derive the same exact depends triplets from runner architecture, and keep PASS_ARGS before TEST_RUNNER_EXTRA in test_integrationtests.sh so target-specific test-runner flags can intentionally override the workflow defaults when they overlap. Update previous-release handling for the vendorless aarch64/x86_64 triplets used by the new native linux64 jobs. --- .github/workflows/build-depends.yml | 12 ++- .github/workflows/build.yml | 112 ++++++++++++-------- .github/workflows/test-src.yml | 9 +- ci/dash/matrix.sh | 6 +- ci/dash/test_integrationtests.sh | 5 +- ci/test/00_setup_env.sh | 27 ++++- ci/test/00_setup_env_aarch64.sh | 26 ----- ci/test/00_setup_env_native_multiprocess.sh | 18 ---- ci/test/00_setup_env_native_nowallet.sh | 1 - ci/test/00_setup_env_native_qt5.sh | 11 +- ci/test/00_setup_env_native_tsan.sh | 18 ---- ci/test/00_setup_env_native_x86canary.sh | 23 ++++ ci/test/05_before_script.sh | 3 +- test/get_previous_releases.py | 5 +- 14 files changed, 151 insertions(+), 125 deletions(-) delete mode 100755 ci/test/00_setup_env_aarch64.sh create mode 100755 ci/test/00_setup_env_native_x86canary.sh diff --git a/.github/workflows/build-depends.yml b/.github/workflows/build-depends.yml index d3600b3806cc..486f0fb8c89a 100644 --- a/.github/workflows/build-depends.yml +++ b/.github/workflows/build-depends.yml @@ -19,6 +19,10 @@ on: description: "Runner label to use (e.g., ubuntu-24.04 or ubuntu-24.04-arm)" required: true type: string + effective-runs-on: + description: "Optional runner label override used to execute the workflow jobs" + required: false + type: string outputs: key: description: "Key needed for restoring depends cache" @@ -33,7 +37,7 @@ on: jobs: check-cache: name: Check cache - runs-on: ${{ inputs.runs-on }} + runs-on: ${{ inputs.effective-runs-on || inputs.runs-on }} outputs: cache-hit: ${{ steps.cache-check.outputs.cache-hit }} cache-key: ${{ steps.setup.outputs.cache-key }} @@ -67,7 +71,7 @@ jobs: echo "DEP_HASH=${DEP_HASH}" >> "${GITHUB_OUTPUT}" DOCKERFILE_HASH="${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'contrib/containers/ci/ci-slim.Dockerfile') }}" PACKAGES_HASH="${{ hashFiles('depends/packages/*', 'depends/Makefile') }}" - CACHE_KEY_PREFIX="depends-${DOCKERFILE_HASH}-${{ inputs.base-image-digest }}-${{ inputs.runs-on }}-${{ inputs.build-target }}" + CACHE_KEY_PREFIX="depends-${DOCKERFILE_HASH}-${{ inputs.base-image-digest }}-${{ inputs.effective-runs-on || inputs.runs-on }}-${{ inputs.build-target }}" CACHE_KEY="${CACHE_KEY_PREFIX}-${DEP_HASH}-${PACKAGES_HASH}" echo "cache-key-prefix=${CACHE_KEY_PREFIX}" >> "${GITHUB_OUTPUT}" echo "cache-key=${CACHE_KEY}" >> "${GITHUB_OUTPUT}" @@ -99,7 +103,7 @@ jobs: name: Build depends needs: [check-cache] if: needs.check-cache.outputs.cache-hit != 'true' - runs-on: ${{ inputs.runs-on }} + runs-on: ${{ inputs.effective-runs-on || inputs.runs-on }} container: image: ${{ inputs.container-path }} options: --user root @@ -136,7 +140,7 @@ jobs: - name: Build depends run: | export HOST="${{ needs.check-cache.outputs.host }}" - env ${{ needs.check-cache.outputs.dep-opts }} make -j$(nproc) -C depends + env ${{ needs.check-cache.outputs.dep-opts }} make -j"$(nproc)" -C depends - name: Save depends cache uses: actions/cache/save@v5 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f4b5128f93b..466c849d7fd5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -112,26 +112,27 @@ jobs: runs-on-amd64: ${{ needs.check-skip.outputs['runner-amd64'] }} runs-on-arm64: ${{ needs.check-skip.outputs['runner-arm64'] }} - depends-aarch64-linux: - name: aarch64-linux-gnu + depends-linux64: + name: linux64 (native) uses: ./.github/workflows/build-depends.yml needs: [check-skip, container, cache-sources] - if: ${{ vars.SKIP_ARM_LINUX == '' }} + if: | + vars.SKIP_LINUX64 == '' || + vars.SKIP_LINUX64_FUZZ == '' || + vars.SKIP_LINUX64_SQLITE == '' with: - build-target: aarch64-linux + build-target: linux64 container-path: ${{ needs.container.outputs.path }} base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }} - runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} + runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }} - depends-linux64: - name: x86_64-pc-linux-gnu + depends-linux64-x86: + name: linux64 (x86 canary) uses: ./.github/workflows/build-depends.yml needs: [check-skip, container, cache-sources] if: | - vars.SKIP_LINUX64 == '' || - vars.SKIP_LINUX64_FUZZ == '' || - vars.SKIP_LINUX64_SQLITE == '' || - vars.SKIP_LINUX64_UBSAN == '' + vars.SKIP_LINUX64_UBSAN == '' || + vars.SKIP_LINUX64_X86CANARY == '' with: build-target: linux64 container-path: ${{ needs.container.outputs.path }} @@ -142,17 +143,26 @@ jobs: name: linux64_multiprocess uses: ./.github/workflows/build-depends.yml needs: [check-skip, container, cache-sources] - if: | - vars.SKIP_LINUX64_MULTIPROCESS == '' || - vars.SKIP_LINUX64_TSAN == '' + if: ${{ vars.SKIP_LINUX64_TSAN == '' }} with: build-target: linux64_multiprocess container-path: ${{ needs.container.outputs.path }} base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }} runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }} + depends-linux64_multiprocess-x86: + name: linux64_multiprocess (x86) + uses: ./.github/workflows/build-depends.yml + needs: [check-skip, container, cache-sources] + if: ${{ vars.SKIP_LINUX64_MULTIPROCESS == '' }} + with: + build-target: linux64_multiprocess + container-path: ${{ needs.container.outputs.path }} + base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }} + runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} + depends-linux64_nowallet: - name: x86_64-pc-linux-gnu_nowallet + name: linux64_nowallet (native) uses: ./.github/workflows/build-depends.yml needs: [check-skip, container, cache-sources] if: ${{ vars.SKIP_LINUX64_NOWALLET == '' }} @@ -160,7 +170,7 @@ jobs: build-target: linux64_nowallet container-path: ${{ needs.container.outputs.path }} base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }} - runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} + runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }} depends-mac: name: x86_64-apple-darwin @@ -192,18 +202,6 @@ jobs: container-path: ${{ needs.container-slim.outputs.path }} runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} - src-aarch64-linux: - name: aarch64-linux-build - uses: ./.github/workflows/build-src.yml - needs: [check-skip, container, depends-aarch64-linux] - with: - build-target: aarch64-linux - container-path: ${{ needs.container.outputs.path }} - depends-key: ${{ needs.depends-aarch64-linux.outputs.key }} - depends-host: ${{ needs.depends-aarch64-linux.outputs.host }} - depends-dep-opts: ${{ needs.depends-aarch64-linux.outputs.dep-opts }} - runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} - src-linux64: name: linux64-build uses: ./.github/workflows/build-src.yml @@ -215,7 +213,7 @@ jobs: depends-key: ${{ needs.depends-linux64.outputs.key }} depends-host: ${{ needs.depends-linux64.outputs.host }} depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }} - runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} + runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }} src-linux64_fuzz: name: linux64_fuzz-build @@ -228,20 +226,20 @@ jobs: depends-key: ${{ needs.depends-linux64.outputs.key }} depends-host: ${{ needs.depends-linux64.outputs.host }} depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }} - runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} + runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }} src-linux64_multiprocess: name: linux64_multiprocess-build uses: ./.github/workflows/build-src.yml - needs: [check-skip, container, depends-linux64_multiprocess, lint] + needs: [check-skip, container, depends-linux64_multiprocess-x86, lint] if: ${{ vars.SKIP_LINUX64_MULTIPROCESS == '' }} with: build-target: linux64_multiprocess container-path: ${{ needs.container.outputs.path }} - depends-key: ${{ needs.depends-linux64_multiprocess.outputs.key }} - depends-host: ${{ needs.depends-linux64_multiprocess.outputs.host }} - depends-dep-opts: ${{ needs.depends-linux64_multiprocess.outputs.dep-opts }} - runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }} + depends-key: ${{ needs.depends-linux64_multiprocess-x86.outputs.key }} + depends-host: ${{ needs.depends-linux64_multiprocess-x86.outputs.host }} + depends-dep-opts: ${{ needs.depends-linux64_multiprocess-x86.outputs.dep-opts }} + runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} src-linux64_nowallet: name: linux64_nowallet-build @@ -253,7 +251,7 @@ jobs: depends-key: ${{ needs.depends-linux64_nowallet.outputs.key }} depends-host: ${{ needs.depends-linux64_nowallet.outputs.host }} depends-dep-opts: ${{ needs.depends-linux64_nowallet.outputs.dep-opts }} - runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} + runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }} src-linux64_sqlite: name: linux64_sqlite-build @@ -266,7 +264,7 @@ jobs: depends-key: ${{ needs.depends-linux64.outputs.key }} depends-host: ${{ needs.depends-linux64.outputs.host }} depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }} - runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} + runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }} src-linux64_tsan: name: linux64_tsan-build @@ -284,14 +282,27 @@ jobs: src-linux64_ubsan: name: linux64_ubsan-build uses: ./.github/workflows/build-src.yml - needs: [check-skip, container, depends-linux64] + needs: [check-skip, container, depends-linux64-x86] if: ${{ vars.SKIP_LINUX64_UBSAN == '' }} with: build-target: linux64_ubsan 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-key: ${{ needs.depends-linux64-x86.outputs.key }} + depends-host: ${{ needs.depends-linux64-x86.outputs.host }} + depends-dep-opts: ${{ needs.depends-linux64-x86.outputs.dep-opts }} + runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} + + src-linux64_x86canary: + name: linux64_x86canary-build + uses: ./.github/workflows/build-src.yml + needs: [check-skip, container, depends-linux64-x86] + if: ${{ vars.SKIP_LINUX64_X86CANARY == '' }} + with: + build-target: linux64_x86canary + container-path: ${{ needs.container.outputs.path }} + depends-key: ${{ needs.depends-linux64-x86.outputs.key }} + depends-host: ${{ needs.depends-linux64-x86.outputs.host }} + depends-dep-opts: ${{ needs.depends-linux64-x86.outputs.dep-opts }} runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} src-mac: @@ -326,7 +337,7 @@ jobs: bundle-key: ${{ needs.src-linux64.outputs.key }} build-target: linux64 container-path: ${{ needs.container-slim.outputs.path }} - runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} + runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }} test-linux64_multiprocess: name: linux64_multiprocess-test @@ -336,7 +347,7 @@ jobs: bundle-key: ${{ needs.src-linux64_multiprocess.outputs.key }} build-target: linux64_multiprocess container-path: ${{ needs.container-slim.outputs.path }} - runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }} + runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} test-linux64_nowallet: name: linux64_nowallet-test @@ -346,7 +357,7 @@ jobs: bundle-key: ${{ needs.src-linux64_nowallet.outputs.key }} build-target: linux64_nowallet container-path: ${{ needs.container-slim.outputs.path }} - runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} + runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }} test-linux64_sqlite: name: linux64_sqlite-test @@ -356,7 +367,7 @@ jobs: 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-amd64'] }} + runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }} test-linux64_tsan: name: linux64_tsan-test @@ -377,3 +388,14 @@ jobs: build-target: linux64_ubsan container-path: ${{ needs.container-slim.outputs.path }} runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} + + test-linux64_x86canary: + name: linux64_x86canary-test + uses: ./.github/workflows/test-src.yml + needs: [check-skip, container-slim, src-linux64_x86canary, lint] + with: + bundle-key: ${{ needs.src-linux64_x86canary.outputs.key }} + build-target: linux64_x86canary + container-path: ${{ needs.container-slim.outputs.path }} + runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }} + integration-tests-args: "--exclude feature_pruning,feature_dbcrash" diff --git a/.github/workflows/test-src.yml b/.github/workflows/test-src.yml index 0f6e22ec0b0d..694a70de33f2 100644 --- a/.github/workflows/test-src.yml +++ b/.github/workflows/test-src.yml @@ -19,9 +19,14 @@ on: description: "Runner label to use (e.g., ubuntu-24.04 or ubuntu-24.04-arm)" required: true type: string + integration-tests-args: + description: "Override for INTEGRATION_TESTS_ARGS passed to test_integrationtests.sh" + required: false + type: string + default: "--extended --exclude feature_pruning,feature_dbcrash" env: - INTEGRATION_TESTS_ARGS: "--extended --exclude feature_pruning,feature_dbcrash" + INTEGRATION_TESTS_ARGS: ${{ inputs.integration-tests-args }} CI_FAILFAST_TEST_LEAVE_DANGLING: 1 # GHA does not care about dangling processes and setting this variable avoids killing the CI script itself on error jobs: @@ -49,7 +54,7 @@ jobs: with: path: | releases - key: releases-${{ hashFiles('ci/test/00_setup_env_native_qt5.sh', 'test/get_previous_releases.py') }} + key: releases-${{ runner.arch }}-${{ hashFiles('ci/test/00_setup_env_native_qt5.sh', 'test/get_previous_releases.py') }} - name: Run functional tests id: test diff --git a/ci/dash/matrix.sh b/ci/dash/matrix.sh index 6e249fc476d1..ed67afe66667 100755 --- a/ci/dash/matrix.sh +++ b/ci/dash/matrix.sh @@ -16,9 +16,7 @@ export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/l export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1" export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1" -if [ "$BUILD_TARGET" = "aarch64-linux" ]; then - source ./ci/test/00_setup_env_aarch64.sh -elif [ "$BUILD_TARGET" = "linux64" ]; then +if [ "$BUILD_TARGET" = "linux64" ]; then source ./ci/test/00_setup_env_native_qt5.sh elif [ "$BUILD_TARGET" = "linux64_asan" ]; then source ./ci/test/00_setup_env_native_asan.sh @@ -34,6 +32,8 @@ elif [ "$BUILD_TARGET" = "linux64_tsan" ]; then source ./ci/test/00_setup_env_native_tsan.sh elif [ "$BUILD_TARGET" = "linux64_ubsan" ]; then source ./ci/test/00_setup_env_native_ubsan.sh +elif [ "$BUILD_TARGET" = "linux64_x86canary" ]; then + source ./ci/test/00_setup_env_native_x86canary.sh elif [ "$BUILD_TARGET" = "linux64_valgrind" ]; then source ./ci/test/00_setup_env_native_valgrind.sh elif [ "$BUILD_TARGET" = "mac" ]; then diff --git a/ci/dash/test_integrationtests.sh b/ci/dash/test_integrationtests.sh index d546931d7cae..23ea35ed469a 100755 --- a/ci/dash/test_integrationtests.sh +++ b/ci/dash/test_integrationtests.sh @@ -23,7 +23,7 @@ export LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then echo "Downloading previous releases..." # shellcheck disable=SC2086 - ./test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" + ./test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" ${PREVIOUS_RELEASES_TAGS:-} fi cd "build-ci/dashcore-$BUILD_TARGET" @@ -43,8 +43,9 @@ echo "Using socketevents mode: $SOCKETEVENTS" EXTRA_ARGS="--dashd-arg=-socketevents=$SOCKETEVENTS" set +e +# Keep PASS_ARGS before TEST_RUNNER_EXTRA so per-target flags can override workflow defaults. # 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 +LD_LIBRARY_PATH="$DEPENDS_DIR/$HOST/lib" ./test/functional/test_runner.py --ci --attempts=3 --ansi --combinedlogslen=4000 --timeout-factor="${TEST_RUNNER_TIMEOUT_FACTOR}" $PASS_ARGS ${TEST_RUNNER_EXTRA} --failfast --nocleanup --tmpdir="$(pwd)/testdatadirs" $EXTRA_ARGS RESULT=$? set -e diff --git a/ci/test/00_setup_env.sh b/ci/test/00_setup_env.sh index 4207615a1a94..60ca2ad2cb19 100755 --- a/ci/test/00_setup_env.sh +++ b/ci/test/00_setup_env.sh @@ -31,8 +31,31 @@ export MAKEJOBS=${MAKEJOBS:--j$(nproc)} export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch} # 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 -export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")} +# Tests that run natively detect the host based on architecture. +# We use explicit triplets rather than config.guess to ensure they match +# the triplets used by depends (e.g. aarch64-linux-gnu, not aarch64-unknown-linux-gnu). +if [ -z "$HOST" ]; then + case "$(uname -m)" in + aarch64) + export HOST=aarch64-linux-gnu + ;; + x86_64) + export HOST=x86_64-pc-linux-gnu + ;; + *) + if command -v dpkg >/dev/null 2>&1; then + arch="$(dpkg --print-architecture)" + if [ "${arch}" = "arm64" ]; then + export HOST=aarch64-linux-gnu + elif [ "${arch}" = "amd64" ]; then + export HOST=x86_64-pc-linux-gnu + fi + fi + # Final fallback to config.guess + export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")} + ;; + esac +fi # Whether to prefer BusyBox over GNU utilities export USE_BUSY_BOX=${USE_BUSY_BOX:-false} diff --git a/ci/test/00_setup_env_aarch64.sh b/ci/test/00_setup_env_aarch64.sh deleted file mode 100755 index d1edb9b95f38..000000000000 --- a/ci/test/00_setup_env_aarch64.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2019-2021 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 HOST=aarch64-linux-gnu -# The host arch is unknown, so we run the tests through qemu. -# 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" -if [ -n "$QEMU_USER_CMD" ]; then - # Likely cross-compiling, so install the needed gcc and qemu-user - export PACKAGES="$PACKAGES qemu-user" -fi -export CONTAINER_NAME=ci_aarch64_linux -# Use debian to avoid 404 apt errors when cross compiling -export CHECK_DOC=0 -export USE_BUSY_BOX=true -export RUN_UNIT_TESTS=false -export RUN_FUNCTIONAL_TESTS=false -export GOAL="install" -export BITCOIN_CONFIG="--enable-reduce-exports" diff --git a/ci/test/00_setup_env_native_multiprocess.sh b/ci/test/00_setup_env_native_multiprocess.sh index fbb065a1ae95..134e515025de 100755 --- a/ci/test/00_setup_env_native_multiprocess.sh +++ b/ci/test/00_setup_env_native_multiprocess.sh @@ -7,24 +7,6 @@ export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_native_multiprocess -case "$(uname -m)" in - aarch64) - export HOST=aarch64-linux-gnu - ;; - x86_64) - export HOST=x86_64-pc-linux-gnu - ;; - *) - if command -v dpkg >/dev/null 2>&1; then - arch="$(dpkg --print-architecture)" - if [ "${arch}" = "arm64" ]; then - export HOST=aarch64-linux-gnu - elif [ "${arch}" = "amd64" ]; then - export HOST=x86_64-pc-linux-gnu - fi - fi - ;; -esac export PACKAGES="cmake python3 llvm clang" export DEP_OPTS="MULTIPROCESS=1 CC=clang-19 CXX=clang++-19" export RUN_TIDY=true diff --git a/ci/test/00_setup_env_native_nowallet.sh b/ci/test/00_setup_env_native_nowallet.sh index 3e083c3d4d62..1e1426d82115 100755 --- a/ci/test/00_setup_env_native_nowallet.sh +++ b/ci/test/00_setup_env_native_nowallet.sh @@ -7,7 +7,6 @@ export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_native_nowallet -export HOST=x86_64-pc-linux-gnu export PACKAGES="python3-zmq" export DEP_OPTS="NO_WALLET=1 CC=gcc-14 CXX=g++-14" export GOAL="install" diff --git a/ci/test/00_setup_env_native_qt5.sh b/ci/test/00_setup_env_native_qt5.sh index 1b41c7d4644e..80464659e431 100755 --- a/ci/test/00_setup_env_native_qt5.sh +++ b/ci/test/00_setup_env_native_qt5.sh @@ -7,10 +7,17 @@ export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_native_qt5 -export HOST=x86_64-pc-linux-gnu export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev" export DEP_OPTS="" -export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_pruning,feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash +# Run extended tests so that coverage does not fail, but exclude the very slow dbcrash +# On native ARM (aarch64), v0.12.1.5 has no aarch64 binary; exclude the test +# that requires it and limit previous release downloads to available versions +if [ "$(uname -m)" = "aarch64" ]; then + export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_pruning,feature_dbcrash,feature_unsupported_utxo_db" + export PREVIOUS_RELEASES_TAGS="v21.1.1 v20.1.1 v19.3.0 v18.2.2 v0.17.0.3 v0.16.1.1 v0.15.0.0" +else + export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_pruning,feature_dbcrash" +fi export RUN_UNIT_TESTS_SEQUENTIAL="true" export RUN_UNIT_TESTS="false" export GOAL="install" diff --git a/ci/test/00_setup_env_native_tsan.sh b/ci/test/00_setup_env_native_tsan.sh index f84f594735f6..798ded8afd16 100755 --- a/ci/test/00_setup_env_native_tsan.sh +++ b/ci/test/00_setup_env_native_tsan.sh @@ -7,24 +7,6 @@ export LC_ALL=C.UTF-8 export CONTAINER_NAME=ci_native_tsan -case "$(uname -m)" in - aarch64) - export HOST=aarch64-linux-gnu - ;; - x86_64) - export HOST=x86_64-pc-linux-gnu - ;; - *) - if command -v dpkg >/dev/null 2>&1; then - arch="$(dpkg --print-architecture)" - if [ "${arch}" = "arm64" ]; then - export HOST=aarch64-linux-gnu - elif [ "${arch}" = "amd64" ]; then - export HOST=x86_64-pc-linux-gnu - fi - fi - ;; -esac export PACKAGES="clang-19 llvm-19 libclang-rt-19-dev libc++abi-19-dev libc++-19-dev python3-zmq" export DEP_OPTS="CC=clang-19 CXX='clang++-19 -stdlib=libc++'" export TEST_RUNNER_EXTRA="--extended --exclude feature_pruning,feature_dbcrash,wallet_multiwallet.py" # Temporarily suppress ASan heap-use-after-free (see issue #14163) diff --git a/ci/test/00_setup_env_native_x86canary.sh b/ci/test/00_setup_env_native_x86canary.sh new file mode 100755 index 000000000000..406e3e0a2e09 --- /dev/null +++ b/ci/test/00_setup_env_native_x86canary.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2024-2025 The Dash 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 + +# Inherit packages, depends, unit-test flags and BITCOIN_CONFIG from the +# main native qt5 target so the canary builds the same binaries the ARM +# lane does, just on x86. +source ./ci/test/00_setup_env_native_qt5.sh + +# Base-only functional tests: the ARM lane already runs --extended, so we +# only need a fast smoke suite on x86 to catch wallet/core regressions +# that might depend on x86 behavior (alignment, SSE, glibc-on-x86 quirks). +# Drop --extended and --previous-releases; base tests don't need them. +# Drop --coverage too: the coverage check requires every RPC to be +# exercised (e.g. pruneblockchain needs feature_pruning), and those +# tests are extended-only — the ARM lane owns RPC coverage tracking. +export TEST_RUNNER_EXTRA="--exclude feature_pruning,feature_dbcrash" +export DOWNLOAD_PREVIOUS_RELEASES="false" +unset PREVIOUS_RELEASES_TAGS diff --git a/ci/test/05_before_script.sh b/ci/test/05_before_script.sh index e8043f65dfd7..a00d0efbabe6 100755 --- a/ci/test/05_before_script.sh +++ b/ci/test/05_before_script.sh @@ -31,5 +31,6 @@ if [ -z "$NO_DEPENDS" ]; then CI_EXEC "$SHELL_OPTS" make "$MAKEJOBS" -C depends HOST="$HOST" "$DEP_OPTS" LOG=1 fi if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then - CI_EXEC test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" + # shellcheck disable=SC2086 + CI_EXEC test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" ${PREVIOUS_RELEASES_TAGS:-} fi diff --git a/test/get_previous_releases.py b/test/get_previous_releases.py index d56648bf4d43..8c720d843a4b 100755 --- a/test/get_previous_releases.py +++ b/test/get_previous_releases.py @@ -130,6 +130,9 @@ def download_binary(tag, args) -> int: elif platform in ["x86_64-apple-darwin", "arm64-apple-darwin"]: print(f"Binaries not available for {tag} on {platform}") return 1 + elif platform in ["aarch64-linux-gnu"]: + print(f"Binaries not available for {tag} on {platform}") + return 1 elif platform in ["x86_64-linux-gnu"]: platform = "linux64" elif tag < "v20" and platform in ["x86_64-apple-darwin", "arm64-apple-darwin"]: @@ -272,7 +275,7 @@ def check_host(args) -> int: } args.platform = '' for pattern, target in platforms.items(): - if fnmatch(args.host, pattern): + if fnmatch(args.host, pattern) or args.host == target: args.platform = target if not args.platform: print('Not sure which binary to download for {}'.format(args.host))