@@ -28,9 +28,7 @@ name: 'OpenJDK GHA Sanity Checks'
28
28
on :
29
29
push :
30
30
branches-ignore :
31
- - master
32
31
- pr/*
33
- - jdk*
34
32
workflow_dispatch :
35
33
inputs :
36
34
platforms :
43
41
make-arguments :
44
42
description : ' Additional make arguments'
45
43
required : false
44
+ dry-run :
45
+ description : ' Dry run: skip actual builds and tests'
46
+ required : false
46
47
47
48
concurrency :
48
49
group : ${{ github.workflow }}-${{ github.ref }}
70
71
windows-x64 : ${{ steps.include.outputs.windows-x64 }}
71
72
windows-aarch64 : ${{ steps.include.outputs.windows-aarch64 }}
72
73
docs : ${{ steps.include.outputs.docs }}
74
+ dry-run : ${{ steps.include.outputs.dry-run }}
73
75
74
76
steps :
75
77
- name : ' Checkout the scripts'
@@ -143,6 +145,35 @@ jobs:
143
145
echo 'false'
144
146
}
145
147
148
+ function check_dry_run() {
149
+ if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
150
+ # Take the user-specified one.
151
+ echo '${{ github.event.inputs.dry-run }}'
152
+ return
153
+ elif [[ $GITHUB_EVENT_NAME == push ]]; then
154
+ # Cut out the real branch name
155
+ BRANCH=${GITHUB_REF##*/}
156
+
157
+ # Dry run rebuilds the caches in current branch, so they can be reused
158
+ # for any child PR branches. Because of this, we want to trigger this
159
+ # workflow in master branch, so that actual PR branches can use the cache.
160
+ # This workflow would trigger every time contributors sync their master
161
+ # branches in their personal forks.
162
+ if [[ $BRANCH == "master" ]]; then
163
+ echo 'true'
164
+ return
165
+ fi
166
+
167
+ # ...same for stabilization branches
168
+ if [[ $BRANCH =~ "jdk(.*)" ]]; then
169
+ echo 'true'
170
+ return
171
+ fi
172
+ fi
173
+
174
+ echo 'false'
175
+ }
176
+
146
177
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
147
178
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
148
179
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
@@ -152,6 +183,7 @@ jobs:
152
183
echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
153
184
echo "windows-aarch64=$(check_platform windows-aarch64 windows aarch64)" >> $GITHUB_OUTPUT
154
185
echo "docs=$(check_platform docs)" >> $GITHUB_OUTPUT
186
+ echo "dry-run=$(check_dry_run)" >> $GITHUB_OUTPUT
155
187
156
188
# ##
157
189
# ## Build jobs
@@ -166,6 +198,7 @@ jobs:
166
198
gcc-major-version : ' 10'
167
199
configure-arguments : ${{ github.event.inputs.configure-arguments }}
168
200
make-arguments : ${{ github.event.inputs.make-arguments }}
201
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
169
202
if : needs.prepare.outputs.linux-x64 == 'true'
170
203
171
204
build-linux-x64-hs-nopch :
@@ -180,6 +213,7 @@ jobs:
180
213
extra-conf-options : ' --disable-precompiled-headers'
181
214
configure-arguments : ${{ github.event.inputs.configure-arguments }}
182
215
make-arguments : ${{ github.event.inputs.make-arguments }}
216
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
183
217
if : needs.prepare.outputs.linux-x64-variants == 'true'
184
218
185
219
build-linux-x64-hs-zero :
@@ -194,6 +228,7 @@ jobs:
194
228
extra-conf-options : ' --with-jvm-variants=zero --disable-precompiled-headers'
195
229
configure-arguments : ${{ github.event.inputs.configure-arguments }}
196
230
make-arguments : ${{ github.event.inputs.make-arguments }}
231
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
197
232
if : needs.prepare.outputs.linux-x64-variants == 'true'
198
233
199
234
build-linux-x64-hs-minimal :
@@ -208,6 +243,7 @@ jobs:
208
243
extra-conf-options : ' --with-jvm-variants=minimal --disable-precompiled-headers'
209
244
configure-arguments : ${{ github.event.inputs.configure-arguments }}
210
245
make-arguments : ${{ github.event.inputs.make-arguments }}
246
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
211
247
if : needs.prepare.outputs.linux-x64-variants == 'true'
212
248
213
249
build-linux-x64-hs-optimized :
@@ -223,6 +259,7 @@ jobs:
223
259
extra-conf-options : ' --with-debug-level=optimized --disable-precompiled-headers'
224
260
configure-arguments : ${{ github.event.inputs.configure-arguments }}
225
261
make-arguments : ${{ github.event.inputs.make-arguments }}
262
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
226
263
if : needs.prepare.outputs.linux-x64-variants == 'true'
227
264
228
265
build-linux-x64-static :
@@ -238,6 +275,7 @@ jobs:
238
275
gcc-major-version : ' 10'
239
276
configure-arguments : ${{ github.event.inputs.configure-arguments }}
240
277
make-arguments : ${{ github.event.inputs.make-arguments }}
278
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
241
279
static-suffix : " -static"
242
280
if : needs.prepare.outputs.linux-x64 == 'true'
243
281
@@ -254,6 +292,7 @@ jobs:
254
292
gcc-major-version : ' 10'
255
293
configure-arguments : ${{ github.event.inputs.configure-arguments }}
256
294
make-arguments : ${{ github.event.inputs.make-arguments }}
295
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
257
296
# Upload static libs bundles separately to avoid interference with normal linux-x64 bundle.
258
297
# This bundle is not used by testing jobs, but downstreams use it to check that
259
298
# dependent projects, e.g. libgraal, builds fine.
@@ -268,6 +307,7 @@ jobs:
268
307
gcc-major-version : ' 10'
269
308
configure-arguments : ${{ github.event.inputs.configure-arguments }}
270
309
make-arguments : ${{ github.event.inputs.make-arguments }}
310
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
271
311
if : needs.prepare.outputs.linux-cross-compile == 'true'
272
312
273
313
build-alpine-linux-x64 :
@@ -278,6 +318,7 @@ jobs:
278
318
platform : alpine-linux-x64
279
319
configure-arguments : ${{ github.event.inputs.configure-arguments }}
280
320
make-arguments : ${{ github.event.inputs.make-arguments }}
321
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
281
322
if : needs.prepare.outputs.alpine-linux-x64 == 'true'
282
323
283
324
build-macos-x64 :
@@ -290,6 +331,7 @@ jobs:
290
331
xcode-toolset-version : ' 14.3.1'
291
332
configure-arguments : ${{ github.event.inputs.configure-arguments }}
292
333
make-arguments : ${{ github.event.inputs.make-arguments }}
334
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
293
335
if : needs.prepare.outputs.macos-x64 == 'true'
294
336
295
337
build-macos-aarch64 :
@@ -302,6 +344,7 @@ jobs:
302
344
xcode-toolset-version : ' 15.4'
303
345
configure-arguments : ${{ github.event.inputs.configure-arguments }}
304
346
make-arguments : ${{ github.event.inputs.make-arguments }}
347
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
305
348
if : needs.prepare.outputs.macos-aarch64 == 'true'
306
349
307
350
build-windows-x64 :
@@ -314,6 +357,7 @@ jobs:
314
357
msvc-toolset-architecture : ' x86.x64'
315
358
configure-arguments : ${{ github.event.inputs.configure-arguments }}
316
359
make-arguments : ${{ github.event.inputs.make-arguments }}
360
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
317
361
if : needs.prepare.outputs.windows-x64 == 'true'
318
362
319
363
build-windows-aarch64 :
@@ -328,6 +372,7 @@ jobs:
328
372
extra-conf-options : ' --openjdk-target=aarch64-unknown-cygwin'
329
373
configure-arguments : ${{ github.event.inputs.configure-arguments }}
330
374
make-arguments : ${{ github.event.inputs.make-arguments }}
375
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
331
376
if : needs.prepare.outputs.windows-aarch64 == 'true'
332
377
333
378
build-docs :
@@ -344,6 +389,7 @@ jobs:
344
389
gcc-major-version : ' 10'
345
390
configure-arguments : ${{ github.event.inputs.configure-arguments }}
346
391
make-arguments : ${{ github.event.inputs.make-arguments }}
392
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
347
393
if : needs.prepare.outputs.docs == 'true'
348
394
349
395
# ##
@@ -353,45 +399,53 @@ jobs:
353
399
test-linux-x64 :
354
400
name : linux-x64
355
401
needs :
402
+ - prepare
356
403
- build-linux-x64
357
404
uses : ./.github/workflows/test.yml
358
405
with :
359
406
platform : linux-x64
360
407
bootjdk-platform : linux-x64
361
408
runs-on : ubuntu-22.04
409
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
362
410
debug-suffix : -debug
363
411
364
412
test-linux-x64-static :
365
413
name : linux-x64-static
366
414
needs :
415
+ - prepare
367
416
- build-linux-x64
368
417
- build-linux-x64-static
369
418
uses : ./.github/workflows/test.yml
370
419
with :
371
420
platform : linux-x64
372
421
bootjdk-platform : linux-x64
373
422
runs-on : ubuntu-22.04
423
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
374
424
static-suffix : " -static"
375
425
376
426
test-macos-aarch64 :
377
427
name : macos-aarch64
378
428
needs :
429
+ - prepare
379
430
- build-macos-aarch64
380
431
uses : ./.github/workflows/test.yml
381
432
with :
382
433
platform : macos-aarch64
383
434
bootjdk-platform : macos-aarch64
384
435
runs-on : macos-14
436
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
385
437
xcode-toolset-version : ' 15.4'
386
438
debug-suffix : -debug
387
439
388
440
test-windows-x64 :
389
441
name : windows-x64
390
442
needs :
443
+ - prepare
391
444
- build-windows-x64
392
445
uses : ./.github/workflows/test.yml
393
446
with :
394
447
platform : windows-x64
395
448
bootjdk-platform : windows-x64
396
449
runs-on : windows-2025
450
+ dry-run : ${{ needs.prepare.outputs.dry-run == 'true' }}
397
451
debug-suffix : -debug
0 commit comments