Skip to content

Commit 7cd3bee

Browse files
committed
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.
1 parent 7e524b1 commit 7cd3bee

14 files changed

Lines changed: 151 additions & 125 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: 67 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -112,26 +112,27 @@ 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 }}
124-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
127+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
125128

126-
depends-linux64:
127-
name: x86_64-pc-linux-gnu
129+
depends-linux64-x86:
130+
name: linux64 (x86 canary)
128131
uses: ./.github/workflows/build-depends.yml
129132
needs: [check-skip, container, cache-sources]
130133
if: |
131-
vars.SKIP_LINUX64 == '' ||
132-
vars.SKIP_LINUX64_FUZZ == '' ||
133-
vars.SKIP_LINUX64_SQLITE == '' ||
134-
vars.SKIP_LINUX64_UBSAN == ''
134+
vars.SKIP_LINUX64_UBSAN == '' ||
135+
vars.SKIP_LINUX64_X86CANARY == ''
135136
with:
136137
build-target: linux64
137138
container-path: ${{ needs.container.outputs.path }}
@@ -142,25 +143,34 @@ jobs:
142143
name: linux64_multiprocess
143144
uses: ./.github/workflows/build-depends.yml
144145
needs: [check-skip, container, cache-sources]
145-
if: |
146-
vars.SKIP_LINUX64_MULTIPROCESS == '' ||
147-
vars.SKIP_LINUX64_TSAN == ''
146+
if: ${{ vars.SKIP_LINUX64_TSAN == '' }}
148147
with:
149148
build-target: linux64_multiprocess
150149
container-path: ${{ needs.container.outputs.path }}
151150
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
152151
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
153152

153+
depends-linux64_multiprocess-x86:
154+
name: linux64_multiprocess (x86)
155+
uses: ./.github/workflows/build-depends.yml
156+
needs: [check-skip, container, cache-sources]
157+
if: ${{ vars.SKIP_LINUX64_MULTIPROCESS == '' }}
158+
with:
159+
build-target: linux64_multiprocess
160+
container-path: ${{ needs.container.outputs.path }}
161+
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
162+
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
163+
154164
depends-linux64_nowallet:
155-
name: x86_64-pc-linux-gnu_nowallet
165+
name: linux64_nowallet (native)
156166
uses: ./.github/workflows/build-depends.yml
157167
needs: [check-skip, container, cache-sources]
158168
if: ${{ vars.SKIP_LINUX64_NOWALLET == '' }}
159169
with:
160170
build-target: linux64_nowallet
161171
container-path: ${{ needs.container.outputs.path }}
162172
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
163-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
173+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
164174

165175
depends-mac:
166176
name: x86_64-apple-darwin
@@ -192,18 +202,6 @@ jobs:
192202
container-path: ${{ needs.container-slim.outputs.path }}
193203
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
194204

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-
207205
src-linux64:
208206
name: linux64-build
209207
uses: ./.github/workflows/build-src.yml
@@ -215,7 +213,7 @@ jobs:
215213
depends-key: ${{ needs.depends-linux64.outputs.key }}
216214
depends-host: ${{ needs.depends-linux64.outputs.host }}
217215
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
218-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
216+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
219217

220218
src-linux64_fuzz:
221219
name: linux64_fuzz-build
@@ -228,20 +226,20 @@ jobs:
228226
depends-key: ${{ needs.depends-linux64.outputs.key }}
229227
depends-host: ${{ needs.depends-linux64.outputs.host }}
230228
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
231-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
229+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
232230

233231
src-linux64_multiprocess:
234232
name: linux64_multiprocess-build
235233
uses: ./.github/workflows/build-src.yml
236-
needs: [check-skip, container, depends-linux64_multiprocess, lint]
234+
needs: [check-skip, container, depends-linux64_multiprocess-x86, lint]
237235
if: ${{ vars.SKIP_LINUX64_MULTIPROCESS == '' }}
238236
with:
239237
build-target: linux64_multiprocess
240238
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'] }}
239+
depends-key: ${{ needs.depends-linux64_multiprocess-x86.outputs.key }}
240+
depends-host: ${{ needs.depends-linux64_multiprocess-x86.outputs.host }}
241+
depends-dep-opts: ${{ needs.depends-linux64_multiprocess-x86.outputs.dep-opts }}
242+
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
245243

246244
src-linux64_nowallet:
247245
name: linux64_nowallet-build
@@ -253,7 +251,7 @@ jobs:
253251
depends-key: ${{ needs.depends-linux64_nowallet.outputs.key }}
254252
depends-host: ${{ needs.depends-linux64_nowallet.outputs.host }}
255253
depends-dep-opts: ${{ needs.depends-linux64_nowallet.outputs.dep-opts }}
256-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
254+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
257255

258256
src-linux64_sqlite:
259257
name: linux64_sqlite-build
@@ -266,7 +264,7 @@ jobs:
266264
depends-key: ${{ needs.depends-linux64.outputs.key }}
267265
depends-host: ${{ needs.depends-linux64.outputs.host }}
268266
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
269-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
267+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
270268

271269
src-linux64_tsan:
272270
name: linux64_tsan-build
@@ -284,14 +282,27 @@ jobs:
284282
src-linux64_ubsan:
285283
name: linux64_ubsan-build
286284
uses: ./.github/workflows/build-src.yml
287-
needs: [check-skip, container, depends-linux64]
285+
needs: [check-skip, container, depends-linux64-x86]
288286
if: ${{ vars.SKIP_LINUX64_UBSAN == '' }}
289287
with:
290288
build-target: linux64_ubsan
291289
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 }}
290+
depends-key: ${{ needs.depends-linux64-x86.outputs.key }}
291+
depends-host: ${{ needs.depends-linux64-x86.outputs.host }}
292+
depends-dep-opts: ${{ needs.depends-linux64-x86.outputs.dep-opts }}
293+
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
294+
295+
src-linux64_x86canary:
296+
name: linux64_x86canary-build
297+
uses: ./.github/workflows/build-src.yml
298+
needs: [check-skip, container, depends-linux64-x86]
299+
if: ${{ vars.SKIP_LINUX64_X86CANARY == '' }}
300+
with:
301+
build-target: linux64_x86canary
302+
container-path: ${{ needs.container.outputs.path }}
303+
depends-key: ${{ needs.depends-linux64-x86.outputs.key }}
304+
depends-host: ${{ needs.depends-linux64-x86.outputs.host }}
305+
depends-dep-opts: ${{ needs.depends-linux64-x86.outputs.dep-opts }}
295306
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
296307

297308
src-mac:
@@ -326,7 +337,7 @@ jobs:
326337
bundle-key: ${{ needs.src-linux64.outputs.key }}
327338
build-target: linux64
328339
container-path: ${{ needs.container-slim.outputs.path }}
329-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
340+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
330341

331342
test-linux64_multiprocess:
332343
name: linux64_multiprocess-test
@@ -336,7 +347,7 @@ jobs:
336347
bundle-key: ${{ needs.src-linux64_multiprocess.outputs.key }}
337348
build-target: linux64_multiprocess
338349
container-path: ${{ needs.container-slim.outputs.path }}
339-
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
350+
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
340351

341352
test-linux64_nowallet:
342353
name: linux64_nowallet-test
@@ -346,7 +357,7 @@ jobs:
346357
bundle-key: ${{ needs.src-linux64_nowallet.outputs.key }}
347358
build-target: linux64_nowallet
348359
container-path: ${{ needs.container-slim.outputs.path }}
349-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
360+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
350361

351362
test-linux64_sqlite:
352363
name: linux64_sqlite-test
@@ -356,7 +367,7 @@ jobs:
356367
bundle-key: ${{ needs.src-linux64_sqlite.outputs.key }}
357368
build-target: linux64_sqlite
358369
container-path: ${{ needs.container-slim.outputs.path }}
359-
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
370+
runs-on: ${{ needs.check-skip.outputs['runner-arm64'] }}
360371

361372
test-linux64_tsan:
362373
name: linux64_tsan-test
@@ -377,3 +388,14 @@ jobs:
377388
build-target: linux64_ubsan
378389
container-path: ${{ needs.container-slim.outputs.path }}
379390
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
391+
392+
test-linux64_x86canary:
393+
name: linux64_x86canary-test
394+
uses: ./.github/workflows/test-src.yml
395+
needs: [check-skip, container-slim, src-linux64_x86canary, lint]
396+
with:
397+
bundle-key: ${{ needs.src-linux64_x86canary.outputs.key }}
398+
build-target: linux64_x86canary
399+
container-path: ${{ needs.container-slim.outputs.path }}
400+
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}
401+
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: 3 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"
@@ -43,8 +43,9 @@ echo "Using socketevents mode: $SOCKETEVENTS"
4343
EXTRA_ARGS="--dashd-arg=-socketevents=$SOCKETEVENTS"
4444

4545
set +e
46+
# Keep PASS_ARGS before TEST_RUNNER_EXTRA so per-target flags can override workflow defaults.
4647
# 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
48+
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
4849
RESULT=$?
4950
set -e
5051

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

0 commit comments

Comments
 (0)