@@ -29,8 +29,7 @@ name: 'SapMachine GHA Sanity Checks'
29
29
on :
30
30
push :
31
31
branches-ignore :
32
- # SapMachine 2020-11-04: Ignore sapmachine branch
33
- - sapmachine
32
+ - pr/*
34
33
# SapMachine 2020-11-04: Trigger on pull request
35
34
pull_request :
36
35
branches :
47
46
make-arguments :
48
47
description : ' Additional make arguments'
49
48
required : false
49
+ dry-run :
50
+ description : ' Dry run: skip actual builds and tests'
51
+ required : false
50
52
51
53
concurrency :
52
54
group : ${{ github.workflow }}-${{ github.ref }}
76
78
windows-x64 : ${{ steps.include.outputs.windows-x64 }}
77
79
windows-aarch64 : ${{ steps.include.outputs.windows-aarch64 }}
78
80
docs : ${{ steps.include.outputs.docs }}
81
+ dry-run : ${{ steps.include.outputs.dry-run }}
79
82
80
83
steps :
81
84
- name : ' Checkout the scripts'
@@ -150,6 +153,47 @@ jobs:
150
153
echo 'false'
151
154
}
152
155
156
+ function check_dry_run() {
157
+ if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
158
+ # Take the user-specified one.
159
+ echo '${{ github.event.inputs.dry-run }}'
160
+ return
161
+ elif [[ $GITHUB_EVENT_NAME == push ]]; then
162
+ # Cut out the real branch name
163
+ BRANCH=${GITHUB_REF##*/}
164
+
165
+ # Dry run rebuilds the caches in current branch, so they can be reused
166
+ # for any child PR branches. Because of this, we want to trigger this
167
+ # workflow in master branch, so that actual PR branches can use the cache.
168
+ # This workflow would trigger every time contributors sync their master
169
+ # branches in their personal forks.
170
+ if [[ $BRANCH == "master" ]]; then
171
+ echo 'true'
172
+ return
173
+ fi
174
+
175
+ # SapMachine 2025-07-14: Add sapmachine branch
176
+ if [[ $BRANCH == "sapmachine" ]]; then
177
+ echo 'true'
178
+ return
179
+ fi
180
+
181
+ # ...same for stabilization branches
182
+ if [[ $BRANCH =~ "jdk(.*)" ]]; then
183
+ echo 'true'
184
+ return
185
+ fi
186
+
187
+ # SapMachine 2025-07-14: Add sapmachine* branches
188
+ if [[ $BRANCH =~ "sapmachine([0-9]+)" ]]; then
189
+ echo 'true'
190
+ return
191
+ fi
192
+ fi
193
+
194
+ echo 'false'
195
+ }
196
+
153
197
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
154
198
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
155
199
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
@@ -159,6 +203,7 @@ jobs:
159
203
echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
160
204
echo "windows-aarch64=$(check_platform windows-aarch64 windows aarch64)" >> $GITHUB_OUTPUT
161
205
echo "docs=$(check_platform docs)" >> $GITHUB_OUTPUT
206
+ echo "dry-run=$(check_dry_run)" >> $GITHUB_OUTPUT
162
207
163
208
# ##
164
209
# ## Build jobs
@@ -173,6 +218,7 @@ jobs:
173
218
gcc-major-version : ' 10'
174
219
configure-arguments : ${{ github.event.inputs.configure-arguments }}
175
220
make-arguments : ${{ github.event.inputs.make-arguments }}
221
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
176
222
if : needs.prepare.outputs.linux-x64 == 'true'
177
223
178
224
build-linux-x64-hs-nopch :
@@ -187,6 +233,7 @@ jobs:
187
233
extra-conf-options : ' --disable-precompiled-headers'
188
234
configure-arguments : ${{ github.event.inputs.configure-arguments }}
189
235
make-arguments : ${{ github.event.inputs.make-arguments }}
236
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
190
237
if : needs.prepare.outputs.linux-x64-variants == 'true'
191
238
192
239
build-linux-x64-hs-zero :
@@ -201,6 +248,7 @@ jobs:
201
248
extra-conf-options : ' --with-jvm-variants=zero --disable-precompiled-headers'
202
249
configure-arguments : ${{ github.event.inputs.configure-arguments }}
203
250
make-arguments : ${{ github.event.inputs.make-arguments }}
251
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
204
252
if : needs.prepare.outputs.linux-x64-variants == 'true'
205
253
206
254
build-linux-x64-hs-minimal :
@@ -215,6 +263,7 @@ jobs:
215
263
extra-conf-options : ' --with-jvm-variants=minimal --disable-precompiled-headers'
216
264
configure-arguments : ${{ github.event.inputs.configure-arguments }}
217
265
make-arguments : ${{ github.event.inputs.make-arguments }}
266
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
218
267
if : needs.prepare.outputs.linux-x64-variants == 'true'
219
268
220
269
build-linux-x64-hs-optimized :
@@ -230,6 +279,7 @@ jobs:
230
279
extra-conf-options : ' --with-debug-level=optimized --disable-precompiled-headers'
231
280
configure-arguments : ${{ github.event.inputs.configure-arguments }}
232
281
make-arguments : ${{ github.event.inputs.make-arguments }}
282
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
233
283
if : needs.prepare.outputs.linux-x64-variants == 'true'
234
284
235
285
build-linux-x64-static :
@@ -245,6 +295,7 @@ jobs:
245
295
gcc-major-version : ' 10'
246
296
configure-arguments : ${{ github.event.inputs.configure-arguments }}
247
297
make-arguments : ${{ github.event.inputs.make-arguments }}
298
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
248
299
static-suffix : " -static"
249
300
if : needs.prepare.outputs.linux-x64 == 'true'
250
301
@@ -261,6 +312,7 @@ jobs:
261
312
gcc-major-version : ' 10'
262
313
configure-arguments : ${{ github.event.inputs.configure-arguments }}
263
314
make-arguments : ${{ github.event.inputs.make-arguments }}
315
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
264
316
# Upload static libs bundles separately to avoid interference with normal linux-x64 bundle.
265
317
# This bundle is not used by testing jobs, but downstreams use it to check that
266
318
# dependent projects, e.g. libgraal, builds fine.
@@ -275,6 +327,7 @@ jobs:
275
327
gcc-major-version : ' 10'
276
328
configure-arguments : ${{ github.event.inputs.configure-arguments }}
277
329
make-arguments : ${{ github.event.inputs.make-arguments }}
330
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
278
331
if : needs.prepare.outputs.linux-cross-compile == 'true'
279
332
280
333
build-alpine-linux-x64 :
@@ -285,6 +338,7 @@ jobs:
285
338
platform : alpine-linux-x64
286
339
configure-arguments : ${{ github.event.inputs.configure-arguments }}
287
340
make-arguments : ${{ github.event.inputs.make-arguments }}
341
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
288
342
if : needs.prepare.outputs.alpine-linux-x64 == 'true'
289
343
290
344
build-macos-x64 :
@@ -297,6 +351,7 @@ jobs:
297
351
xcode-toolset-version : ' 14.3.1'
298
352
configure-arguments : ${{ github.event.inputs.configure-arguments }}
299
353
make-arguments : ${{ github.event.inputs.make-arguments }}
354
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
300
355
if : needs.prepare.outputs.macos-x64 == 'true'
301
356
302
357
build-macos-aarch64 :
@@ -309,6 +364,7 @@ jobs:
309
364
xcode-toolset-version : ' 15.4'
310
365
configure-arguments : ${{ github.event.inputs.configure-arguments }}
311
366
make-arguments : ${{ github.event.inputs.make-arguments }}
367
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
312
368
if : needs.prepare.outputs.macos-aarch64 == 'true'
313
369
314
370
build-windows-x64 :
@@ -321,6 +377,7 @@ jobs:
321
377
msvc-toolset-architecture : ' x86.x64'
322
378
configure-arguments : ${{ github.event.inputs.configure-arguments }}
323
379
make-arguments : ${{ github.event.inputs.make-arguments }}
380
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
324
381
if : needs.prepare.outputs.windows-x64 == 'true'
325
382
326
383
build-windows-aarch64 :
@@ -335,6 +392,7 @@ jobs:
335
392
extra-conf-options : ' --openjdk-target=aarch64-unknown-cygwin'
336
393
configure-arguments : ${{ github.event.inputs.configure-arguments }}
337
394
make-arguments : ${{ github.event.inputs.make-arguments }}
395
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
338
396
if : needs.prepare.outputs.windows-aarch64 == 'true'
339
397
340
398
build-docs :
@@ -351,6 +409,7 @@ jobs:
351
409
gcc-major-version : ' 10'
352
410
configure-arguments : ${{ github.event.inputs.configure-arguments }}
353
411
make-arguments : ${{ github.event.inputs.make-arguments }}
412
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
354
413
if : needs.prepare.outputs.docs == 'true'
355
414
356
415
# ##
@@ -360,45 +419,53 @@ jobs:
360
419
test-linux-x64 :
361
420
name : linux-x64
362
421
needs :
422
+ - prepare
363
423
- build-linux-x64
364
424
uses : ./.github/workflows/test.yml
365
425
with :
366
426
platform : linux-x64
367
427
bootjdk-platform : linux-x64
368
428
runs-on : ubuntu-22.04
429
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
369
430
debug-suffix : -debug
370
431
371
432
test-linux-x64-static :
372
433
name : linux-x64-static
373
434
needs :
435
+ - prepare
374
436
- build-linux-x64
375
437
- build-linux-x64-static
376
438
uses : ./.github/workflows/test.yml
377
439
with :
378
440
platform : linux-x64
379
441
bootjdk-platform : linux-x64
380
442
runs-on : ubuntu-22.04
443
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
381
444
static-suffix : " -static"
382
445
383
446
test-macos-aarch64 :
384
447
name : macos-aarch64
385
448
needs :
449
+ - prepare
386
450
- build-macos-aarch64
387
451
uses : ./.github/workflows/test.yml
388
452
with :
389
453
platform : macos-aarch64
390
454
bootjdk-platform : macos-aarch64
391
455
runs-on : macos-14
456
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
392
457
xcode-toolset-version : ' 15.4'
393
458
debug-suffix : -debug
394
459
395
460
test-windows-x64 :
396
461
name : windows-x64
397
462
needs :
463
+ - prepare
398
464
- build-windows-x64
399
465
uses : ./.github/workflows/test.yml
400
466
with :
401
467
platform : windows-x64
402
468
bootjdk-platform : windows-x64
403
469
runs-on : windows-2025
470
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
404
471
debug-suffix : -debug
0 commit comments