Skip to content

Commit be4edd5

Browse files
committed
ci: use repo variables for runner selection (Blacksmith + fork compat)
Use `vars.RUNNER_AMD64` and `vars.RUNNER_ARM64` repo variables to select CI runners, with GitHub-hosted runners as fallback defaults. On dashpay/dash, set these variables to Blacksmith runner labels for faster builds. On forks (where the variables aren't set), CI automatically falls back to standard GitHub-hosted runners with no degradation. Changes: - build.yml: check-skip + all sub-workflow calls now explicitly pass runs-on using ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }} or ARM64 - build-container.yml: runner selection via vars with fallback - build-depends.yml, build-src.yml, test-src.yml: defaults reverted to ubuntu-24.04 (callers always pass explicitly now) - cache-depends-sources.yml: vars with fallback - lint.yml: vars with fallback To enable Blacksmith on a repo, set these repository variables: - RUNNER_AMD64=blacksmith-4vcpu-ubuntu-2404 - RUNNER_ARM64=blacksmith-4vcpu-ubuntu-2404-arm
1 parent 5386751 commit be4edd5

File tree

7 files changed

+31
-14
lines changed

7 files changed

+31
-14
lines changed

.github/workflows/build-container.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
jobs:
2424
build-amd64:
2525
name: Build container (amd64)
26-
runs-on: blacksmith-4vcpu-ubuntu-2404
26+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
2727
outputs:
2828
tag: ${{ steps.prepare.outputs.tag }}
2929
repo: ${{ steps.prepare.outputs.repo }}
@@ -65,7 +65,7 @@ jobs:
6565
6666
build-arm64:
6767
name: Build container (arm64)
68-
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
68+
runs-on: ${{ vars.RUNNER_ARM64 || 'ubuntu-24.04-arm' }}
6969
outputs:
7070
digest: ${{ steps.build.outputs.digest }}
7171
steps:
@@ -105,7 +105,7 @@ jobs:
105105
106106
create-manifest:
107107
name: Create multi-arch manifest
108-
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
108+
runs-on: ${{ vars.RUNNER_ARM64 || 'ubuntu-24.04-arm' }}
109109
needs: [build-amd64, build-arm64]
110110
steps:
111111
- name: Checkout code

.github/workflows/build-depends.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
runs-on:
1515
description: "Runner label to use (e.g., ubuntu-24.04 or ubuntu-24.04-arm)"
1616
required: false
17-
default: blacksmith-4vcpu-ubuntu-2404
17+
default: ubuntu-24.04
1818
type: string
1919
outputs:
2020
key:

.github/workflows/build-src.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ on:
2727
runs-on:
2828
description: "Runner label to use (e.g., ubuntu-24.04 or ubuntu-24.04-arm)"
2929
required: false
30-
default: blacksmith-4vcpu-ubuntu-2404
30+
default: ubuntu-24.04
3131
type: string
3232
outputs:
3333
key:

.github/workflows/build.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ concurrency:
2020
jobs:
2121
check-skip:
2222
name: Check skip conditions
23-
runs-on: blacksmith-4vcpu-ubuntu-2404
23+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
2424
outputs:
2525
skip: ${{ steps.skip-check.outputs.skip }}
2626
steps:
@@ -71,6 +71,7 @@ jobs:
7171
with:
7272
build-target: aarch64-linux
7373
container-path: ${{ needs.container.outputs.path }}
74+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
7475

7576
depends-linux64:
7677
name: x86_64-pc-linux-gnu
@@ -84,6 +85,7 @@ jobs:
8485
with:
8586
build-target: linux64
8687
container-path: ${{ needs.container.outputs.path }}
88+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
8789

8890
depends-linux64_multiprocess:
8991
name: linux64_multiprocess
@@ -95,7 +97,7 @@ jobs:
9597
with:
9698
build-target: linux64_multiprocess
9799
container-path: ${{ needs.container.outputs.path }}
98-
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
100+
runs-on: ${{ vars.RUNNER_ARM64 || 'ubuntu-24.04-arm' }}
99101

100102
depends-linux64_nowallet:
101103
name: x86_64-pc-linux-gnu_nowallet
@@ -105,6 +107,7 @@ jobs:
105107
with:
106108
build-target: linux64_nowallet
107109
container-path: ${{ needs.container.outputs.path }}
110+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
108111

109112
depends-mac:
110113
name: x86_64-apple-darwin
@@ -114,6 +117,7 @@ jobs:
114117
with:
115118
build-target: mac
116119
container-path: ${{ needs.container.outputs.path }}
120+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
117121

118122
depends-win64:
119123
name: x86_64-w64-mingw32
@@ -123,6 +127,7 @@ jobs:
123127
with:
124128
build-target: win64
125129
container-path: ${{ needs.container.outputs.path }}
130+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
126131

127132
lint:
128133
name: Lint
@@ -141,6 +146,7 @@ jobs:
141146
depends-key: ${{ needs.depends-aarch64-linux.outputs.key }}
142147
depends-host: ${{ needs.depends-aarch64-linux.outputs.host }}
143148
depends-dep-opts: ${{ needs.depends-aarch64-linux.outputs.dep-opts }}
149+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
144150

145151
src-linux64:
146152
name: linux64-build
@@ -153,6 +159,7 @@ jobs:
153159
depends-key: ${{ needs.depends-linux64.outputs.key }}
154160
depends-host: ${{ needs.depends-linux64.outputs.host }}
155161
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
162+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
156163

157164
src-linux64_fuzz:
158165
name: linux64_fuzz-build
@@ -165,6 +172,7 @@ jobs:
165172
depends-key: ${{ needs.depends-linux64.outputs.key }}
166173
depends-host: ${{ needs.depends-linux64.outputs.host }}
167174
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
175+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
168176

169177
src-linux64_multiprocess:
170178
name: linux64_multiprocess-build
@@ -177,7 +185,7 @@ jobs:
177185
depends-key: ${{ needs.depends-linux64_multiprocess.outputs.key }}
178186
depends-host: ${{ needs.depends-linux64_multiprocess.outputs.host }}
179187
depends-dep-opts: ${{ needs.depends-linux64_multiprocess.outputs.dep-opts }}
180-
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
188+
runs-on: ${{ vars.RUNNER_ARM64 || 'ubuntu-24.04-arm' }}
181189

182190
src-linux64_nowallet:
183191
name: linux64_nowallet-build
@@ -189,6 +197,7 @@ jobs:
189197
depends-key: ${{ needs.depends-linux64_nowallet.outputs.key }}
190198
depends-host: ${{ needs.depends-linux64_nowallet.outputs.host }}
191199
depends-dep-opts: ${{ needs.depends-linux64_nowallet.outputs.dep-opts }}
200+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
192201

193202
src-linux64_sqlite:
194203
name: linux64_sqlite-build
@@ -201,6 +210,7 @@ jobs:
201210
depends-key: ${{ needs.depends-linux64.outputs.key }}
202211
depends-host: ${{ needs.depends-linux64.outputs.host }}
203212
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
213+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
204214

205215
src-linux64_tsan:
206216
name: linux64_tsan-build
@@ -213,7 +223,7 @@ jobs:
213223
depends-key: ${{ needs.depends-linux64_multiprocess.outputs.key }}
214224
depends-host: ${{ needs.depends-linux64_multiprocess.outputs.host }}
215225
depends-dep-opts: ${{ needs.depends-linux64_multiprocess.outputs.dep-opts }}
216-
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
226+
runs-on: ${{ vars.RUNNER_ARM64 || 'ubuntu-24.04-arm' }}
217227

218228
src-linux64_ubsan:
219229
name: linux64_ubsan-build
@@ -226,6 +236,7 @@ jobs:
226236
depends-key: ${{ needs.depends-linux64.outputs.key }}
227237
depends-host: ${{ needs.depends-linux64.outputs.host }}
228238
depends-dep-opts: ${{ needs.depends-linux64.outputs.dep-opts }}
239+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
229240

230241
src-mac:
231242
name: mac-build
@@ -237,6 +248,7 @@ jobs:
237248
depends-key: ${{ needs.depends-mac.outputs.key }}
238249
depends-host: ${{ needs.depends-mac.outputs.host }}
239250
depends-dep-opts: ${{ needs.depends-mac.outputs.dep-opts }}
251+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
240252

241253
src-win64:
242254
name: win64-build
@@ -248,6 +260,7 @@ jobs:
248260
depends-key: ${{ needs.depends-win64.outputs.key }}
249261
depends-host: ${{ needs.depends-win64.outputs.host }}
250262
depends-dep-opts: ${{ needs.depends-win64.outputs.dep-opts }}
263+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
251264

252265
test-linux64:
253266
name: linux64-test
@@ -257,6 +270,7 @@ jobs:
257270
bundle-key: ${{ needs.src-linux64.outputs.key }}
258271
build-target: linux64
259272
container-path: ${{ needs.container-slim.outputs.path }}
273+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
260274

261275
test-linux64_multiprocess:
262276
name: linux64_multiprocess-test
@@ -266,7 +280,7 @@ jobs:
266280
bundle-key: ${{ needs.src-linux64_multiprocess.outputs.key }}
267281
build-target: linux64_multiprocess
268282
container-path: ${{ needs.container-slim.outputs.path }}
269-
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
283+
runs-on: ${{ vars.RUNNER_ARM64 || 'ubuntu-24.04-arm' }}
270284

271285
test-linux64_nowallet:
272286
name: linux64_nowallet-test
@@ -276,6 +290,7 @@ jobs:
276290
bundle-key: ${{ needs.src-linux64_nowallet.outputs.key }}
277291
build-target: linux64_nowallet
278292
container-path: ${{ needs.container-slim.outputs.path }}
293+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
279294

280295
test-linux64_sqlite:
281296
name: linux64_sqlite-test
@@ -285,6 +300,7 @@ jobs:
285300
bundle-key: ${{ needs.src-linux64_sqlite.outputs.key }}
286301
build-target: linux64_sqlite
287302
container-path: ${{ needs.container-slim.outputs.path }}
303+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
288304

289305
test-linux64_tsan:
290306
name: linux64_tsan-test
@@ -294,7 +310,7 @@ jobs:
294310
bundle-key: ${{ needs.src-linux64_tsan.outputs.key }}
295311
build-target: linux64_tsan
296312
container-path: ${{ needs.container-slim.outputs.path }}
297-
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
313+
runs-on: ${{ vars.RUNNER_ARM64 || 'ubuntu-24.04-arm' }}
298314

299315
test-linux64_ubsan:
300316
name: linux64_ubsan-test
@@ -304,3 +320,4 @@ jobs:
304320
bundle-key: ${{ needs.src-linux64_ubsan.outputs.key }}
305321
build-target: linux64_ubsan
306322
container-path: ${{ needs.container-slim.outputs.path }}
323+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}

.github/workflows/cache-depends-sources.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
cache-sources:
1111
name: Cache depends sources
12-
runs-on: ubuntu-24.04-arm
12+
runs-on: ${{ vars.RUNNER_ARM64 || 'ubuntu-24.04-arm' }}
1313
steps:
1414
- name: Checkout code
1515
uses: actions/checkout@v4

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
lint:
1313
name: Run linters
14-
runs-on: ubuntu-24.04
14+
runs-on: ${{ vars.RUNNER_AMD64 || 'ubuntu-24.04' }}
1515
container:
1616
image: ${{ inputs.container-path }}
1717
options: --user root

.github/workflows/test-src.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
runs-on:
1919
description: "Runner label to use (e.g., ubuntu-24.04 or ubuntu-24.04-arm)"
2020
required: false
21-
default: blacksmith-4vcpu-ubuntu-2404
21+
default: ubuntu-24.04
2222
type: string
2323

2424
env:

0 commit comments

Comments
 (0)