Skip to content

Commit 18e3dce

Browse files
committed
ci: migrate primary CI jobs to ARM runners
Move depends-linux64 and its consumers (linux64, fuzz, sqlite, ubsan) to ARM runners, making aarch64 the primary CI architecture. This includes both build and test stages. 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. Jobs remaining on x86: - nowallet (build + test): sole x86_64 native coverage - mac, win64: cross-compile targets (x86 host) - lint: architecture-independent Update 00_setup_env_native_qt5.sh to dynamically detect HOST based on the runner architecture instead of hardcoding x86_64.
1 parent 9985e10 commit 18e3dce

11 files changed

Lines changed: 51 additions & 104 deletions

.github/workflows/build.yml

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,8 @@ jobs:
9090
runs-on-amd64: ${{ needs.check-skip.outputs['runner-amd64'] }}
9191
runs-on-arm64: ${{ needs.check-skip.outputs['runner-arm64'] }}
9292

93-
depends-aarch64-linux:
94-
name: aarch64-linux-gnu
95-
uses: ./.github/workflows/build-depends.yml
96-
needs: [check-skip, container, cache-sources]
97-
if: ${{ vars.SKIP_ARM_LINUX == '' }}
98-
with:
99-
build-target: aarch64-linux
100-
container-path: ${{ needs.container.outputs.path }}
101-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
102-
10393
depends-linux64:
104-
name: x86_64-pc-linux-gnu
94+
name: linux64 (native)
10595
uses: ./.github/workflows/build-depends.yml
10696
needs: [check-skip, container, cache-sources]
10797
if: |
@@ -112,7 +102,7 @@ jobs:
112102
with:
113103
build-target: linux64
114104
container-path: ${{ needs.container.outputs.path }}
115-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
105+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
116106

117107
depends-linux64_multiprocess:
118108
name: linux64_multiprocess
@@ -164,18 +154,6 @@ jobs:
164154
container-path: ${{ needs.container-slim.outputs.path }}
165155
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
166156

167-
src-aarch64-linux:
168-
name: aarch64-linux-build
169-
uses: ./.github/workflows/build-src.yml
170-
needs: [check-skip, container, depends-aarch64-linux]
171-
with:
172-
build-target: aarch64-linux
173-
container-path: ${{ needs.container.outputs.path }}
174-
depends-key: ${{ needs.depends-aarch64-linux.outputs.key }}
175-
depends-host: ${{ needs.depends-aarch64-linux.outputs.host }}
176-
depends-dep-opts: ${{ needs.depends-aarch64-linux.outputs.dep-opts }}
177-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
178-
179157
src-linux64:
180158
name: linux64-build
181159
uses: ./.github/workflows/build-src.yml
@@ -187,7 +165,7 @@ jobs:
187165
depends-key: ${{ needs.depends-linux64.outputs.key }}
188166
depends-host: ${{ needs.depends-linux64.outputs.host }}
189167
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
190-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
168+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
191169

192170
src-linux64_fuzz:
193171
name: linux64_fuzz-build
@@ -200,7 +178,7 @@ jobs:
200178
depends-key: ${{ needs.depends-linux64.outputs.key }}
201179
depends-host: ${{ needs.depends-linux64.outputs.host }}
202180
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
203-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
181+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
204182

205183
src-linux64_multiprocess:
206184
name: linux64_multiprocess-build
@@ -238,7 +216,7 @@ jobs:
238216
depends-key: ${{ needs.depends-linux64.outputs.key }}
239217
depends-host: ${{ needs.depends-linux64.outputs.host }}
240218
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
241-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
219+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
242220

243221
src-linux64_tsan:
244222
name: linux64_tsan-build
@@ -264,7 +242,7 @@ jobs:
264242
depends-key: ${{ needs.depends-linux64.outputs.key }}
265243
depends-host: ${{ needs.depends-linux64.outputs.host }}
266244
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
267-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
245+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
268246

269247
src-mac:
270248
name: mac-build
@@ -298,7 +276,7 @@ jobs:
298276
bundle-key: ${{ needs.src-linux64.outputs.key }}
299277
build-target: linux64
300278
container-path: ${{ needs.container-slim.outputs.path }}
301-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
279+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
302280

303281
test-linux64_multiprocess:
304282
name: linux64_multiprocess-test
@@ -328,7 +306,7 @@ jobs:
328306
bundle-key: ${{ needs.src-linux64_sqlite.outputs.key }}
329307
build-target: linux64_sqlite
330308
container-path: ${{ needs.container-slim.outputs.path }}
331-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
309+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
332310

333311
test-linux64_tsan:
334312
name: linux64_tsan-test
@@ -348,4 +326,4 @@ jobs:
348326
bundle-key: ${{ needs.src-linux64_ubsan.outputs.key }}
349327
build-target: linux64_ubsan
350328
container-path: ${{ needs.container-slim.outputs.path }}
351-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
329+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}

.github/workflows/test-src.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
with:
5050
path: |
5151
releases
52-
key: releases-${{ hashFiles('ci/test/00_setup_env_native_qt5.sh', 'test/get_previous_releases.py') }}
52+
key: releases-${{ runner.arch }}-${{ hashFiles('ci/test/00_setup_env_native_qt5.sh', 'test/get_previous_releases.py') }}
5353

5454
- name: Run functional tests
5555
id: test

ci/dash/matrix.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/l
1616
export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1"
1717
export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1"
1818

19-
if [ "$BUILD_TARGET" = "aarch64-linux" ]; then
20-
source ./ci/test/00_setup_env_aarch64.sh
21-
elif [ "$BUILD_TARGET" = "linux64" ]; then
19+
if [ "$BUILD_TARGET" = "linux64" ]; then
2220
source ./ci/test/00_setup_env_native_qt5.sh
2321
elif [ "$BUILD_TARGET" = "linux64_asan" ]; then
2422
source ./ci/test/00_setup_env_native_asan.sh

ci/dash/test_integrationtests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib
2323
if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then
2424
echo "Downloading previous releases..."
2525
# shellcheck disable=SC2086
26-
./test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR"
26+
./test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" ${PREVIOUS_RELEASES_TAGS:-}
2727
fi
2828

2929
cd "build-ci/dashcore-$BUILD_TARGET"

ci/test/00_setup_env.sh

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,31 @@ export MAKEJOBS=${MAKEJOBS:--j$(nproc)}
3131
export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch}
3232
# What host to compile for. See also ./depends/README.md
3333
# Tests that need cross-compilation export the appropriate HOST.
34-
# Tests that run natively guess the host
35-
export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")}
34+
# Tests that run natively detect the host based on architecture.
35+
# We use explicit triplets rather than config.guess to ensure they match
36+
# the triplets used by depends (e.g. aarch64-linux-gnu, not aarch64-unknown-linux-gnu).
37+
if [ -z "$HOST" ]; then
38+
case "$(uname -m)" in
39+
aarch64)
40+
export HOST=aarch64-linux-gnu
41+
;;
42+
x86_64)
43+
export HOST=x86_64-pc-linux-gnu
44+
;;
45+
*)
46+
if command -v dpkg >/dev/null 2>&1; then
47+
arch="$(dpkg --print-architecture)"
48+
if [ "${arch}" = "arm64" ]; then
49+
export HOST=aarch64-linux-gnu
50+
elif [ "${arch}" = "amd64" ]; then
51+
export HOST=x86_64-pc-linux-gnu
52+
fi
53+
fi
54+
# Final fallback to config.guess
55+
export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")}
56+
;;
57+
esac
58+
fi
3659
# Whether to prefer BusyBox over GNU utilities
3760
export USE_BUSY_BOX=${USE_BUSY_BOX:-false}
3861

ci/test/00_setup_env_aarch64.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

ci/test/00_setup_env_native_multiprocess.sh

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,6 @@
77
export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME=ci_native_multiprocess
10-
case "$(uname -m)" in
11-
aarch64)
12-
export HOST=aarch64-linux-gnu
13-
;;
14-
x86_64)
15-
export HOST=x86_64-pc-linux-gnu
16-
;;
17-
*)
18-
if command -v dpkg >/dev/null 2>&1; then
19-
arch="$(dpkg --print-architecture)"
20-
if [ "${arch}" = "arm64" ]; then
21-
export HOST=aarch64-linux-gnu
22-
elif [ "${arch}" = "amd64" ]; then
23-
export HOST=x86_64-pc-linux-gnu
24-
fi
25-
fi
26-
;;
27-
esac
2810
export PACKAGES="cmake python3 llvm clang"
2911
export DEP_OPTS="MULTIPROCESS=1 CC=clang-19 CXX=clang++-19"
3012
export RUN_TIDY=true

ci/test/00_setup_env_native_qt5.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,17 @@
77
export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME=ci_native_qt5
10-
export HOST=x86_64-pc-linux-gnu
1110
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev"
1211
export DEP_OPTS=""
13-
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
12+
# Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
13+
# On native ARM (aarch64), v0.12.1.5 has no aarch64 binary; exclude the test
14+
# that requires it and limit previous release downloads to available versions
15+
if [ "$(uname -m)" = "aarch64" ]; then
16+
export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_pruning,feature_dbcrash,feature_unsupported_utxo_db"
17+
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"
18+
else
19+
export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_pruning,feature_dbcrash"
20+
fi
1421
export RUN_UNIT_TESTS_SEQUENTIAL="true"
1522
export RUN_UNIT_TESTS="false"
1623
export GOAL="install"

ci/test/00_setup_env_native_tsan.sh

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,6 @@
77
export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME=ci_native_tsan
10-
case "$(uname -m)" in
11-
aarch64)
12-
export HOST=aarch64-linux-gnu
13-
;;
14-
x86_64)
15-
export HOST=x86_64-pc-linux-gnu
16-
;;
17-
*)
18-
if command -v dpkg >/dev/null 2>&1; then
19-
arch="$(dpkg --print-architecture)"
20-
if [ "${arch}" = "arm64" ]; then
21-
export HOST=aarch64-linux-gnu
22-
elif [ "${arch}" = "amd64" ]; then
23-
export HOST=x86_64-pc-linux-gnu
24-
fi
25-
fi
26-
;;
27-
esac
2810
export PACKAGES="clang-19 llvm-19 libclang-rt-19-dev libc++abi-19-dev libc++-19-dev python3-zmq"
2911
export DEP_OPTS="CC=clang-19 CXX='clang++-19 -stdlib=libc++'"
3012
export TEST_RUNNER_EXTRA="--extended --exclude feature_pruning,feature_dbcrash,wallet_multiwallet.py" # Temporarily suppress ASan heap-use-after-free (see issue #14163)

ci/test/05_before_script.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ if [ -z "$NO_DEPENDS" ]; then
3131
CI_EXEC "$SHELL_OPTS" make "$MAKEJOBS" -C depends HOST="$HOST" "$DEP_OPTS" LOG=1
3232
fi
3333
if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then
34-
CI_EXEC test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR"
34+
# shellcheck disable=SC2086
35+
CI_EXEC test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" ${PREVIOUS_RELEASES_TAGS:-}
3536
fi

0 commit comments

Comments
 (0)