@@ -15,13 +15,42 @@ concurrency:
15
15
16
16
jobs :
17
17
18
+ # ----------------------------------------------------------------------------
19
+ # Detect checkboxes are checked
20
+ # ----------------------------------------------------------------------------
21
+ detect_checkboxes :
22
+ name : Detect Checkboxes
23
+ runs-on : ubuntu-latest
24
+ if : github.event.pull_request.draft == false
25
+ outputs :
26
+ checked : ${{ steps.detect.outputs.checked }}
27
+ unchecked : ${{ steps.detect.outputs.unchecked }}
28
+
29
+ permissions :
30
+ pull-requests : write
31
+
32
+ steps :
33
+ - name : Checkbox Trigger
34
+ id : detect
35
+ uses : AhmedBaset/checklist@3
36
+ with :
37
+ token : ${{ github.token }}
38
+
39
+ - name : list changes
40
+ run : |
41
+ echo "checked=${{ steps.detect.outputs.checked }}"
42
+ echo "unchecked=${{ steps.detect.outputs.unchecked }}"
43
+ echo "${{ github.ref }}"
44
+
18
45
# ----------------------------------------------------------------------------
19
46
# Default versions: Set default version for all dependencies
20
47
# ----------------------------------------------------------------------------
21
48
default_versions :
22
49
runs-on : ubuntu-22.04
23
50
container : ghcr.io/f3d-app/f3d-ci
24
51
name : Set default versions
52
+ needs : detect_checkboxes
53
+ if : ${{ (contains(needs.detect_checkboxes.outputs.checked, 'CI')) || (github.ref == 'refs/heads/master') }}
25
54
outputs :
26
55
alembic_version : ${{ steps.set_default_versions.outputs.alembic_version }}
27
56
alembic_min_version : ${{ steps.set_default_versions.outputs.alembic_min_version }}
67
96
cache_lfs :
68
97
runs-on : ubuntu-22.04
69
98
name : Update LFS data cache
99
+ needs : detect_checkboxes
100
+ if : ${{ (contains(needs.detect_checkboxes.outputs.checked, 'CI')) || (github.ref == 'refs/heads/master') }}
70
101
outputs :
71
102
lfs_sha : ${{ steps.lfs_sha_recover.outputs.lfs_sha }}
72
103
steps :
89
120
# ----------------------------------------------------------------------------
90
121
cache_dependencies :
91
122
name : Cache dependencies
92
- needs : default_versions
123
+ needs : [default_versions, detect_checkboxes]
124
+ if : ${{ (contains(needs.detect_checkboxes.outputs.checked, 'cached CI')) || (github.ref == 'refs/heads/master') }}
93
125
strategy :
94
126
fail-fast : false
95
127
matrix :
@@ -148,9 +180,8 @@ jobs:
148
180
# Windows CI: Build and test, cross-vtk build matrix
149
181
# ----------------------------------------------------------------------------
150
182
windows :
151
- if : github.event.pull_request.draft == false
152
- needs : [cache_lfs, cache_dependencies, default_versions]
153
-
183
+ needs : [cache_lfs, cache_dependencies, default_versions, detect_checkboxes]
184
+ if : ${{ (contains(needs.detect_checkboxes.outputs.checked, 'Windows cached CI')) || (github.ref == 'refs/heads/master') }}
154
185
strategy :
155
186
fail-fast : false
156
187
matrix :
@@ -188,12 +219,45 @@ jobs:
188
219
usd_version : ${{needs.default_versions.outputs.usd_version}}
189
220
java_version : ${{needs.default_versions.outputs.java_version}}
190
221
222
+ # ----------------------------------------------------------------------------
223
+ # Linux fast CI: Build and test a single fast CI
224
+ # ----------------------------------------------------------------------------
225
+ linux_fast :
226
+ needs : [cache_lfs, detect_checkboxes]
227
+ if : ${{ (contains(needs.detect_checkboxes.outputs.checked, 'Fast CI')) || (github.ref == 'refs/heads/master') }}
228
+
229
+ runs-on : ubuntu-22.04
230
+ container : ghcr.io/f3d-app/f3d-ci
231
+
232
+ env :
233
+ DISPLAY : :0
234
+
235
+ steps :
236
+ - name : Checkout
237
+ uses : actions/checkout@v4
238
+ with :
239
+ path : ' source'
240
+ fetch-depth : 0
241
+ lfs : false
242
+
243
+ - name : Generic CI
244
+ uses : ./source/.github/actions/generic-ci
245
+ with :
246
+ build_type : fast
247
+ vtk_version : v9.4.2
248
+ raytracing_label : no-raytracing
249
+ rendering_backend : auto
250
+ optional_deps_label : no-optional-deps
251
+ exclude_deprecated_label : exclude-deprecated
252
+ static_label : no-static
253
+ lfs_sha : ${{ needs.cache_lfs.outputs.lfs_sha}}
254
+
191
255
# ----------------------------------------------------------------------------
192
256
# Linux CI: Build and test, cross-vtk build matrix
193
257
# ----------------------------------------------------------------------------
194
258
linux :
195
- if : github.event.pull_request.draft == false
196
- needs : [cache_lfs, cache_dependencies, default_versions]
259
+ needs : [cache_lfs, cache_dependencies, default_versions, detect_checkboxes]
260
+ if : ${{ (contains(needs.detect_checkboxes.outputs.checked, 'Linux cached CI')) || (github.ref == 'refs/heads/master') }}
197
261
198
262
strategy :
199
263
fail-fast : false
@@ -349,8 +413,9 @@ jobs:
349
413
# MacOS CI: Build and test, cross-vtk build matrix
350
414
# ----------------------------------------------------------------------------
351
415
macos :
352
- if : github.event.pull_request.draft == false
353
- needs : [cache_lfs, cache_dependencies, default_versions]
416
+ needs : [cache_lfs, cache_dependencies, default_versions, detect_checkboxes]
417
+ if : ${{ (contains(needs.detect_checkboxes.outputs.checked, 'macOS Intel cached CI')) || (github.ref == 'refs/heads/master') }}
418
+
354
419
strategy :
355
420
fail-fast : false
356
421
matrix :
@@ -387,8 +452,8 @@ jobs:
387
452
# MacOS ARM CI: Build and test, cross-vtk build matrix with a few optional builds
388
453
# ----------------------------------------------------------------------------
389
454
macos_arm :
390
- if : github.event.pull_request.draft == false
391
- needs : [cache_lfs, cache_dependencies, default_versions]
455
+ needs : [cache_lfs, cache_dependencies, default_versions, detect_checkboxes]
456
+ if : ${{ (contains(needs.detect_checkboxes.outputs.checked, 'macOS ARM cached CI')) || (github.ref == 'refs/heads/master') }}
392
457
393
458
strategy :
394
459
fail-fast : false
@@ -437,8 +502,8 @@ jobs:
437
502
# Python packaging: Build and test the Python wheel
438
503
# ----------------------------------------------------------------------------
439
504
python-packaging :
440
- if : github.event.pull_request.draft == false
441
- needs : [cache_lfs, cache_dependencies, default_versions]
505
+ needs : [cache_lfs, cache_dependencies, default_versions, detect_checkboxes]
506
+ if : ${{ (contains(needs.detect_checkboxes.outputs.checked, 'Other cached CI')) || (github.ref == 'refs/heads/master') }}
442
507
443
508
strategy :
444
509
fail-fast : false
@@ -491,8 +556,8 @@ jobs:
491
556
# Coverage: Build and test on linux with last VTK with coverage option
492
557
# ----------------------------------------------------------------------------
493
558
coverage :
494
- needs : [cache_lfs, cache_dependencies, default_versions]
495
- if : github.event.pull_request.draft == false
559
+ needs : [cache_lfs, cache_dependencies, default_versions, detect_checkboxes ]
560
+ if : ${{ (contains(needs.detect_checkboxes.outputs.checked, 'Coverage cached CI')) || (github.ref == 'refs/heads/master') }}
496
561
497
562
runs-on : ubuntu-22.04
498
563
container : ghcr.io/f3d-app/f3d-ci
@@ -532,8 +597,8 @@ jobs:
532
597
# "memory" returns false positives in VTK:
533
598
# https://stackoverflow.com/questions/60097307/memory-sanitizer-reports-use-of-uninitialized-value-in-global-object-constructio
534
599
sanitizer :
535
- needs : [cache_lfs, cache_dependencies, default_versions]
536
- if : github.event.pull_request.draft == false
600
+ needs : [cache_lfs, cache_dependencies, default_versions, detect_checkboxes ]
601
+ if : ${{ (contains(needs.detect_checkboxes.outputs.checked, 'Other cached CI')) || (github.ref == 'refs/heads/master') }}
537
602
538
603
strategy :
539
604
fail-fast : false
@@ -574,8 +639,8 @@ jobs:
574
639
# static-analysis: Run static analysis on linux
575
640
# ----------------------------------------------------------------------------
576
641
static-analysis :
577
- needs : [cache_lfs, cache_dependencies, default_versions]
578
- if : github.event.pull_request.draft == false
642
+ needs : [cache_lfs, cache_dependencies, default_versions, detect_checkboxes ]
643
+ if : ${{ (contains(needs.detect_checkboxes.outputs.checked, 'Analysis cached CI')) || (github.ref == 'refs/heads/master') }}
579
644
580
645
strategy :
581
646
fail-fast : false
@@ -613,8 +678,8 @@ jobs:
613
678
# external-build: Check build of F3D as sub-project
614
679
# ----------------------------------------------------------------------------
615
680
external-build :
616
- needs : [cache_dependencies, default_versions]
617
- if : github.event.pull_request.draft == false
681
+ needs : [cache_dependencies, default_versions, detect_checkboxes ]
682
+ if : ${{ (contains(needs.detect_checkboxes.outputs.checked, 'Other cached CI')) || (github.ref == 'refs/heads/master') }}
618
683
619
684
strategy :
620
685
fail-fast : false
@@ -640,8 +705,8 @@ jobs:
640
705
# android: Check build of F3D for android
641
706
# ----------------------------------------------------------------------------
642
707
android :
643
- if : github.event.pull_request.draft == false
644
- needs : default_versions
708
+ needs : [default_versions, detect_checkboxes]
709
+ if : ${{ (contains(needs.detect_checkboxes.outputs.checked, 'Android CI')) || (github.ref == 'refs/heads/master') }}
645
710
646
711
strategy :
647
712
fail-fast : false
@@ -669,8 +734,8 @@ jobs:
669
734
# webassembly: Build webassembly artifacts
670
735
# ----------------------------------------------------------------------------
671
736
webassembly :
672
- if : github.event.pull_request.draft == false
673
- needs : default_versions
737
+ needs : [default_versions, detect_checkboxes]
738
+ if : ${{ (contains(needs.detect_checkboxes.outputs.checked, 'WASM CI')) || (github.ref == 'refs/heads/master') }}
674
739
675
740
strategy :
676
741
fail-fast : false
0 commit comments