Skip to content

Commit ff5ff35

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 cfad414 commit ff5ff35

14 files changed

Lines changed: 147 additions & 121 deletions

.github/workflows/build-depends.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
description: "Runner label to use (e.g., ubuntu-24.04 or ubuntu-24.04-arm)"
2020
required: true
2121
type: string
22+
effective-runs-on:
23+
description: "Optional runner label override used to execute the workflow jobs"
24+
required: false
25+
type: string
2226
outputs:
2327
key:
2428
description: "Key needed for restoring depends cache"
@@ -33,7 +37,7 @@ on:
3337
jobs:
3438
check-cache:
3539
name: Check cache
36-
runs-on: ${{ inputs.runs-on }}
40+
runs-on: ${{ inputs.effective-runs-on || inputs.runs-on }}
3741
outputs:
3842
cache-hit: ${{ steps.cache-check.outputs.cache-hit }}
3943
cache-key: ${{ steps.setup.outputs.cache-key }}
@@ -67,7 +71,7 @@ jobs:
6771
echo "DEP_HASH=${DEP_HASH}" >> "${GITHUB_OUTPUT}"
6872
DOCKERFILE_HASH="${{ hashFiles('contrib/containers/ci/ci.Dockerfile', 'contrib/containers/ci/ci-slim.Dockerfile') }}"
6973
PACKAGES_HASH="${{ hashFiles('depends/packages/*', 'depends/Makefile') }}"
70-
CACHE_KEY_PREFIX="depends-${DOCKERFILE_HASH}-${{ inputs.base-image-digest }}-${{ inputs.runs-on }}-${{ inputs.build-target }}"
74+
CACHE_KEY_PREFIX="depends-${DOCKERFILE_HASH}-${{ inputs.base-image-digest }}-${{ inputs.effective-runs-on || inputs.runs-on }}-${{ inputs.build-target }}"
7175
CACHE_KEY="${CACHE_KEY_PREFIX}-${DEP_HASH}-${PACKAGES_HASH}"
7276
echo "cache-key-prefix=${CACHE_KEY_PREFIX}" >> "${GITHUB_OUTPUT}"
7377
echo "cache-key=${CACHE_KEY}" >> "${GITHUB_OUTPUT}"
@@ -99,7 +103,7 @@ jobs:
99103
name: Build depends
100104
needs: [check-cache]
101105
if: needs.check-cache.outputs.cache-hit != 'true'
102-
runs-on: ${{ inputs.runs-on }}
106+
runs-on: ${{ inputs.effective-runs-on || inputs.runs-on }}
103107
container:
104108
image: ${{ inputs.container-path }}
105109
options: --user root
@@ -136,7 +140,7 @@ jobs:
136140
- name: Build depends
137141
run: |
138142
export HOST="${{ needs.check-cache.outputs.host }}"
139-
env ${{ needs.check-cache.outputs.dep-opts }} make -j$(nproc) -C depends
143+
env ${{ needs.check-cache.outputs.dep-opts }} make -j"$(nproc)" -C depends
140144
141145
- name: Save depends cache
142146
uses: actions/cache/save@v5

.github/workflows/build.yml

Lines changed: 64 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -112,26 +112,28 @@ jobs:
112112
runs-on-amd64: ${{ needs.check-skip.outputs['runner-amd64'] }}
113113
runs-on-arm64: ${{ needs.check-skip.outputs['runner-arm64'] }}
114114

115-
depends-aarch64-linux:
116-
name: aarch64-linux-gnu
115+
depends-linux64:
116+
name: linux64 (native)
117117
uses: ./.github/workflows/build-depends.yml
118118
needs: [check-skip, container, cache-sources]
119-
if: ${{ vars.SKIP_ARM_LINUX == '' }}
119+
if: |
120+
vars.SKIP_LINUX64 == '' ||
121+
vars.SKIP_LINUX64_FUZZ == '' ||
122+
vars.SKIP_LINUX64_SQLITE == ''
120123
with:
121-
build-target: aarch64-linux
124+
build-target: linux64
122125
container-path: ${{ needs.container.outputs.path }}
123126
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
124127
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
128+
effective-runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
125129

126-
depends-linux64:
127-
name: x86_64-pc-linux-gnu
130+
depends-linux64-x86:
131+
name: linux64 (x86 canary)
128132
uses: ./.github/workflows/build-depends.yml
129133
needs: [check-skip, container, cache-sources]
130134
if: |
131-
vars.SKIP_LINUX64 == '' ||
132-
vars.SKIP_LINUX64_FUZZ == '' ||
133-
vars.SKIP_LINUX64_SQLITE == '' ||
134-
vars.SKIP_LINUX64_UBSAN == ''
135+
vars.SKIP_LINUX64_UBSAN == '' ||
136+
vars.SKIP_LINUX64_X86CANARY == ''
135137
with:
136138
build-target: linux64
137139
container-path: ${{ needs.container.outputs.path }}
@@ -142,17 +144,26 @@ jobs:
142144
name: linux64_multiprocess
143145
uses: ./.github/workflows/build-depends.yml
144146
needs: [check-skip, container, cache-sources]
145-
if: |
146-
vars.SKIP_LINUX64_MULTIPROCESS == '' ||
147-
vars.SKIP_LINUX64_TSAN == ''
147+
if: ${{ vars.SKIP_LINUX64_TSAN == '' }}
148148
with:
149149
build-target: linux64_multiprocess
150150
container-path: ${{ needs.container.outputs.path }}
151151
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
152152
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
153153

154+
depends-linux64_multiprocess-x86:
155+
name: linux64_multiprocess (x86)
156+
uses: ./.github/workflows/build-depends.yml
157+
needs: [check-skip, container, cache-sources]
158+
if: ${{ vars.SKIP_LINUX64_MULTIPROCESS == '' }}
159+
with:
160+
build-target: linux64_multiprocess
161+
container-path: ${{ needs.container.outputs.path }}
162+
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
163+
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
164+
154165
depends-linux64_nowallet:
155-
name: x86_64-pc-linux-gnu_nowallet
166+
name: linux64_nowallet (native)
156167
uses: ./.github/workflows/build-depends.yml
157168
needs: [check-skip, container, cache-sources]
158169
if: ${{ vars.SKIP_LINUX64_NOWALLET == '' }}
@@ -192,18 +203,6 @@ jobs:
192203
container-path: ${{ needs.container-slim.outputs.path }}
193204
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
194205

195-
src-aarch64-linux:
196-
name: aarch64-linux-build
197-
uses: ./.github/workflows/build-src.yml
198-
needs: [check-skip, container, depends-aarch64-linux]
199-
with:
200-
build-target: aarch64-linux
201-
container-path: ${{ needs.container.outputs.path }}
202-
depends-key: ${{ needs.depends-aarch64-linux.outputs.key }}
203-
depends-host: ${{ needs.depends-aarch64-linux.outputs.host }}
204-
depends-dep-opts: ${{ needs.depends-aarch64-linux.outputs.dep-opts }}
205-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
206-
207206
src-linux64:
208207
name: linux64-build
209208
uses: ./.github/workflows/build-src.yml
@@ -215,7 +214,7 @@ jobs:
215214
depends-key: ${{ needs.depends-linux64.outputs.key }}
216215
depends-host: ${{ needs.depends-linux64.outputs.host }}
217216
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
218-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
217+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
219218

220219
src-linux64_fuzz:
221220
name: linux64_fuzz-build
@@ -228,20 +227,20 @@ jobs:
228227
depends-key: ${{ needs.depends-linux64.outputs.key }}
229228
depends-host: ${{ needs.depends-linux64.outputs.host }}
230229
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
231-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
230+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
232231

233232
src-linux64_multiprocess:
234233
name: linux64_multiprocess-build
235234
uses: ./.github/workflows/build-src.yml
236-
needs: [check-skip, container, depends-linux64_multiprocess, lint]
235+
needs: [check-skip, container, depends-linux64_multiprocess-x86, lint]
237236
if: ${{ vars.SKIP_LINUX64_MULTIPROCESS == '' }}
238237
with:
239238
build-target: linux64_multiprocess
240239
container-path: ${{ needs.container.outputs.path }}
241-
depends-key: ${{ needs.depends-linux64_multiprocess.outputs.key }}
242-
depends-host: ${{ needs.depends-linux64_multiprocess.outputs.host }}
243-
depends-dep-opts: ${{ needs.depends-linux64_multiprocess.outputs.dep-opts }}
244-
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
240+
depends-key: ${{ needs.depends-linux64_multiprocess-x86.outputs.key }}
241+
depends-host: ${{ needs.depends-linux64_multiprocess-x86.outputs.host }}
242+
depends-dep-opts: ${{ needs.depends-linux64_multiprocess-x86.outputs.dep-opts }}
243+
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
245244

246245
src-linux64_nowallet:
247246
name: linux64_nowallet-build
@@ -266,7 +265,7 @@ jobs:
266265
depends-key: ${{ needs.depends-linux64.outputs.key }}
267266
depends-host: ${{ needs.depends-linux64.outputs.host }}
268267
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
269-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
268+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
270269

271270
src-linux64_tsan:
272271
name: linux64_tsan-build
@@ -284,14 +283,27 @@ jobs:
284283
src-linux64_ubsan:
285284
name: linux64_ubsan-build
286285
uses: ./.github/workflows/build-src.yml
287-
needs: [check-skip, container, depends-linux64]
286+
needs: [check-skip, container, depends-linux64-x86]
288287
if: ${{ vars.SKIP_LINUX64_UBSAN == '' }}
289288
with:
290289
build-target: linux64_ubsan
291290
container-path: ${{ needs.container.outputs.path }}
292-
depends-key: ${{ needs.depends-linux64.outputs.key }}
293-
depends-host: ${{ needs.depends-linux64.outputs.host }}
294-
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
291+
depends-key: ${{ needs.depends-linux64-x86.outputs.key }}
292+
depends-host: ${{ needs.depends-linux64-x86.outputs.host }}
293+
depends-dep-opts: ${{ needs.depends-linux64-x86.outputs.dep-opts }}
294+
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
295+
296+
src-linux64_x86canary:
297+
name: linux64_x86canary-build
298+
uses: ./.github/workflows/build-src.yml
299+
needs: [check-skip, container, depends-linux64-x86]
300+
if: ${{ vars.SKIP_LINUX64_X86CANARY == '' }}
301+
with:
302+
build-target: linux64_x86canary
303+
container-path: ${{ needs.container.outputs.path }}
304+
depends-key: ${{ needs.depends-linux64-x86.outputs.key }}
305+
depends-host: ${{ needs.depends-linux64-x86.outputs.host }}
306+
depends-dep-opts: ${{ needs.depends-linux64-x86.outputs.dep-opts }}
295307
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
296308

297309
src-mac:
@@ -326,7 +338,7 @@ jobs:
326338
bundle-key: ${{ needs.src-linux64.outputs.key }}
327339
build-target: linux64
328340
container-path: ${{ needs.container-slim.outputs.path }}
329-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
341+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
330342

331343
test-linux64_multiprocess:
332344
name: linux64_multiprocess-test
@@ -336,7 +348,7 @@ jobs:
336348
bundle-key: ${{ needs.src-linux64_multiprocess.outputs.key }}
337349
build-target: linux64_multiprocess
338350
container-path: ${{ needs.container-slim.outputs.path }}
339-
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
351+
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
340352

341353
test-linux64_nowallet:
342354
name: linux64_nowallet-test
@@ -356,7 +368,7 @@ jobs:
356368
bundle-key: ${{ needs.src-linux64_sqlite.outputs.key }}
357369
build-target: linux64_sqlite
358370
container-path: ${{ needs.container-slim.outputs.path }}
359-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
371+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
360372

361373
test-linux64_tsan:
362374
name: linux64_tsan-test
@@ -377,3 +389,14 @@ jobs:
377389
build-target: linux64_ubsan
378390
container-path: ${{ needs.container-slim.outputs.path }}
379391
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
392+
393+
test-linux64_x86canary:
394+
name: linux64_x86canary-test
395+
uses: ./.github/workflows/test-src.yml
396+
needs: [check-skip, container-slim, src-linux64_x86canary, lint]
397+
with:
398+
bundle-key: ${{ needs.src-linux64_x86canary.outputs.key }}
399+
build-target: linux64_x86canary
400+
container-path: ${{ needs.container-slim.outputs.path }}
401+
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
402+
integration-tests-args: "--exclude feature_pruning,feature_dbcrash"

.github/workflows/test-src.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,14 @@ on:
1919
description: "Runner label to use (e.g., ubuntu-24.04 or ubuntu-24.04-arm)"
2020
required: true
2121
type: string
22+
integration-tests-args:
23+
description: "Override for INTEGRATION_TESTS_ARGS passed to test_integrationtests.sh"
24+
required: false
25+
type: string
26+
default: "--extended --exclude feature_pruning,feature_dbcrash"
2227

2328
env:
24-
INTEGRATION_TESTS_ARGS: "--extended --exclude feature_pruning,feature_dbcrash"
29+
INTEGRATION_TESTS_ARGS: ${{ inputs.integration-tests-args }}
2530
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
2631

2732
jobs:
@@ -49,7 +54,7 @@ jobs:
4954
with:
5055
path: |
5156
releases
52-
key: releases-${{ hashFiles('ci/test/00_setup_env_native_qt5.sh', 'test/get_previous_releases.py') }}
57+
key: releases-${{ runner.arch }}-${{ hashFiles('ci/test/00_setup_env_native_qt5.sh', 'test/get_previous_releases.py') }}
5358

5459
- name: Run functional tests
5560
id: test

ci/dash/matrix.sh

Lines changed: 3 additions & 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
@@ -34,6 +32,8 @@ elif [ "$BUILD_TARGET" = "linux64_tsan" ]; then
3432
source ./ci/test/00_setup_env_native_tsan.sh
3533
elif [ "$BUILD_TARGET" = "linux64_ubsan" ]; then
3634
source ./ci/test/00_setup_env_native_ubsan.sh
35+
elif [ "$BUILD_TARGET" = "linux64_x86canary" ]; then
36+
source ./ci/test/00_setup_env_native_x86canary.sh
3737
elif [ "$BUILD_TARGET" = "linux64_valgrind" ]; then
3838
source ./ci/test/00_setup_env_native_valgrind.sh
3939
elif [ "$BUILD_TARGET" = "mac" ]; then

ci/dash/test_integrationtests.sh

Lines changed: 2 additions & 2 deletions
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"
@@ -44,7 +44,7 @@ EXTRA_ARGS="--dashd-arg=-socketevents=$SOCKETEVENTS"
4444

4545
set +e
4646
# shellcheck disable=SC2086
47-
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
47+
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
4848
RESULT=$?
4949
set -e
5050

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.

0 commit comments

Comments
 (0)