-
-
Notifications
You must be signed in to change notification settings - Fork 443
680 lines (604 loc) · 22.6 KB
/
Copy pathci.yml
File metadata and controls
680 lines (604 loc) · 22.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
name: CI
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
paths-ignore:
- "doc/**"
- "_config.yml"
push:
branches:
- master
concurrency:
group: "${{ github.workflow }}-${{ github.ref_name }}"
cancel-in-progress: true
jobs:
#----------------------------------------------------------------------------
# Cache LFS: Checkout LFS data and update the cache to limit LFS bandwidth
#----------------------------------------------------------------------------
cache_lfs:
runs-on: ubuntu-24.04
name: Update LFS data cache
if: |
contains(github.event.pull_request.labels.*.name, 'ci:fast') ||
contains(github.event.pull_request.labels.*.name, 'ci:extended') ||
contains(github.event.pull_request.labels.*.name, 'ci:linux') ||
contains(github.event.pull_request.labels.*.name, 'ci:macos_arm') ||
contains(github.event.pull_request.labels.*.name, 'ci:macos_intel') ||
contains(github.event.pull_request.labels.*.name, 'ci:windows') ||
contains(github.event.pull_request.labels.*.name, 'ci:python') ||
contains(github.event.pull_request.labels.*.name, 'ci:coverage') ||
contains(github.event.pull_request.labels.*.name, 'ci:sanitizer') ||
contains(github.event.pull_request.labels.*.name, 'ci:analysis') ||
contains(github.event.pull_request.labels.*.name, 'ci:wasm') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
outputs:
lfs_sha: ${{ steps.lfs_sha_recover.outputs.lfs_sha }}
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source"
fetch-depth: 1
lfs: false
- name: Cache LFS Data
id: lfs_sha_recover
uses: f3d-app/lfs-data-cache-action@v2
with:
cache_postfix: cache-0
#----------------------------------------------------------------------------
# Recover vtk matrix
#----------------------------------------------------------------------------
recover_vtk_matrix:
name: Recover VTK matrix
runs-on: ubuntu-24.04
if: |
contains(github.event.pull_request.labels.*.name, 'ci:linux') ||
contains(github.event.pull_request.labels.*.name, 'ci:macos_arm') ||
contains(github.event.pull_request.labels.*.name, 'ci:macos_intel') ||
contains(github.event.pull_request.labels.*.name, 'ci:windows') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
outputs:
vtk_matrix: ${{steps.vtk_matrix.outputs.extract}}
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source"
fetch-depth: 1
lfs: false
- name: Extract VTK matrix
id: vtk_matrix
uses: f3d-app/extract-version-action@main
with:
file: ./source/.github/workflows/versions.json
special_name: vtk_matrix
#----------------------------------------------------------------------------
# Windows CI: Build and test, cross-vtk build matrix
#----------------------------------------------------------------------------
windows:
needs: [cache_lfs, recover_vtk_matrix]
if: |
contains(github.event.pull_request.labels.*.name, 'ci:windows') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
strategy:
fail-fast: false
matrix:
vtk_version: ${{fromJSON(needs.recover_vtk_matrix.outputs.vtk_matrix)}}
static_label: [no-static]
include:
- vtk_version: commit
static_label: static
runs-on: windows-2022
env:
CMAKE_POLICY_VERSION_MINIMUM: 3.5
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source"
fetch-depth: 0
lfs: false
- name: Generic CI
uses: ./source/.github/actions/generic-ci
with:
versions_file: ./source/.github/workflows/versions.json
vtk_version: ${{matrix.vtk_version}}
static_label: ${{matrix.static_label}}
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
#----------------------------------------------------------------------------
# Linux fast CI: Build and test a single fast CI
#----------------------------------------------------------------------------
linux_fast:
needs: cache_lfs
if: |
contains(github.event.pull_request.labels.*.name, 'ci:fast') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
runs-on: ubuntu-24.04
container: ghcr.io/f3d-app/f3d-ci
env:
CMAKE_POLICY_VERSION_MINIMUM: 3.5
DISPLAY: :0
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source"
fetch-depth: 0
lfs: false
- name: Generic CI
uses: ./source/.github/actions/generic-ci
with:
versions_file: ./source/.github/workflows/versions.json
build_type: fast
vtk_version: v9.7.0
optdeps_label: no-optdeps
exclude_deprecated_label: exclude-deprecated
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
#----------------------------------------------------------------------------
# Linux not as fast CI: Build and test a single complete linux CI
#----------------------------------------------------------------------------
linux_extended:
needs: cache_lfs
if: |
contains(github.event.pull_request.labels.*.name, 'ci:extended') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
runs-on: ubuntu-24.04
container: ghcr.io/f3d-app/f3d-ci
env:
CMAKE_POLICY_VERSION_MINIMUM: 3.5
DISPLAY: :0
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source"
fetch-depth: 0
lfs: false
- name: Generic CI
uses: ./source/.github/actions/generic-ci
with:
versions_file: ./source/.github/workflows/versions.json
build_type: extended
vtk_version: commit
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
#----------------------------------------------------------------------------
# Linux CI: Build and test, cross-vtk build matrix
#----------------------------------------------------------------------------
linux:
needs: [cache_lfs, recover_vtk_matrix]
if: |
contains(github.event.pull_request.labels.*.name, 'ci:linux') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
strategy:
fail-fast: false
matrix:
vtk_version: ${{fromJSON(needs.recover_vtk_matrix.outputs.vtk_matrix)}}
build_type: [standard]
include:
- exclude_deprecated_label: no-exclude-deprecated
- optdeps_label: optdeps
- mindeps_label: no-mindeps
- gles_label: no-gles
- rendering_backend: auto
- static_label: no-static
- build_type: egl
vtk_version: commit
optdeps_label: optdeps
mindeps_label: no-mindeps
gles_label: no-gles
exclude_deprecated_label: no-exclude-deprecated
rendering_backend: egl
static_label: no-static
- build_type: osmesa
vtk_version: commit
optdeps_label: optdeps
mindeps_label: no-mindeps
gles_label: no-gles
exclude_deprecated_label: no-exclude-deprecated
rendering_backend: osmesa
static_label: no-static
- build_type: exclude_deprecated
vtk_version: commit
optdeps_label: optdeps
mindeps_label: no-mindeps
gles_label: no-gles
exclude_deprecated_label: exclude-deprecated
rendering_backend: auto
static_label: no-static
- build_type: no_optional_deps
vtk_version: commit
optdeps_label: no-optdeps
mindeps_label: no-mindeps
gles_label: no-gles
exclude_deprecated_label: no-exclude-deprecated
rendering_backend: auto
static_label: no-static
- build_type: static_libs
vtk_version: commit
optdeps_label: optdeps
mindeps_label: no-mindeps
gles_label: no-gles
exclude_deprecated_label: no-exclude-deprecated
rendering_backend: auto
static_label: static
- build_type: mindeps
vtk_version: commit
optdeps_label: optdeps
mindeps_label: mindeps
gles_label: no-gles
exclude_deprecated_label: no-exclude-deprecated
rendering_backend: auto
static_label: no-static
- build_type: gles
vtk_version: commit
optdeps_label: optdeps
mindeps_label: no-mindeps
gles_label: gles
exclude_deprecated_label: no-exclude-deprecated
rendering_backend: auto
static_label: no-static
runs-on: ubuntu-24.04
container: ghcr.io/f3d-app/f3d-ci
env:
CMAKE_POLICY_VERSION_MINIMUM: 3.5
DISPLAY: :0
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source"
fetch-depth: 0
lfs: false
- name: Generic CI
uses: ./source/.github/actions/generic-ci
with:
versions_file: ./source/.github/workflows/versions.json
build_type: ${{matrix.build_type}}
vtk_version: ${{matrix.vtk_version}}
rendering_backend: ${{matrix.rendering_backend}}
optdeps_label: ${{matrix.optdeps_label}}
mindeps_label: ${{matrix.mindeps_label}}
gles_label: ${{matrix.gles_label}}
exclude_deprecated_label: ${{matrix.exclude_deprecated_label}}
static_label: ${{matrix.static_label}}
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
#----------------------------------------------------------------------------
# MacOS CI: Build and test, cross-vtk build matrix
#----------------------------------------------------------------------------
macos_intel:
needs: [cache_lfs, recover_vtk_matrix]
if: |
contains(github.event.pull_request.labels.*.name, 'ci:macos_intel') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
strategy:
fail-fast: false
matrix:
vtk_version: ${{fromJSON(needs.recover_vtk_matrix.outputs.vtk_matrix)}}
runs-on: macos-15-intel
env:
CMAKE_POLICY_VERSION_MINIMUM: 3.5
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source"
fetch-depth: 0
lfs: false
# OSMesa is supported on macOS from 9.7.20260706
# Since it's more robust than Apple's software renderer, we use it for the macOS ARM CI
- name: Generic CI
uses: ./source/.github/actions/generic-ci
with:
versions_file: ./source/.github/workflows/versions.json
vtk_version: ${{matrix.vtk_version}}
cpu: x86_64
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
rendering_backend: ${{matrix.vtk_version == 'commit' && 'osmesa' || 'auto'}}
#----------------------------------------------------------------------------
# MacOS ARM CI: Build and test, cross-vtk build matrix with a few optional builds
#----------------------------------------------------------------------------
macos_arm:
needs: [cache_lfs, recover_vtk_matrix]
if: |
contains(github.event.pull_request.labels.*.name, 'ci:macos_arm') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
strategy:
fail-fast: false
matrix:
vtk_version: ${{fromJSON(needs.recover_vtk_matrix.outputs.vtk_matrix)}}
bundle_label: [no-bundle]
static_label: [no-static]
include:
- vtk_version: commit
bundle_label: bundle
static_label: no-static
- vtk_version: commit
bundle_label: no-bundle
static_label: static
runs-on: macos-15
env:
CMAKE_POLICY_VERSION_MINIMUM: 3.5
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source"
fetch-depth: 0
lfs: false
# OSMesa is supported on macOS from 9.7.20260706
# Since it's more robust than Apple's software renderer, we use it for the macOS ARM CI
- name: Generic CI
uses: ./source/.github/actions/generic-ci
with:
versions_file: ./source/.github/workflows/versions.json
vtk_version: ${{matrix.vtk_version}}
bundle_label: ${{matrix.bundle_label}}
static_label: ${{matrix.static_label}}
rendering_backend: ${{matrix.vtk_version == 'commit' && 'osmesa' || 'auto'}}
cpu: arm64
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
#----------------------------------------------------------------------------
# Python packaging: Build and test the Python wheel
#----------------------------------------------------------------------------
python_packaging:
needs: cache_lfs
if: |
contains(github.event.pull_request.labels.*.name, 'ci:python') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2022, macos-15]
python_version: ["3.14"]
include:
- os: ubuntu-24.04
python_version: "3.10"
- os: ubuntu-24.04
python_version: "3.11"
- os: ubuntu-24.04
python_version: "3.12"
- os: ubuntu-24.04
python_version: "3.13"
- os: ubuntu-24.04
python_version: "3.14"
runs-on: ${{matrix.os}}
container: ${{ matrix.os == 'ubuntu-24.04' && 'ghcr.io/f3d-app/f3d-ci' || null }}
env:
DISPLAY: :0
CMAKE_POLICY_VERSION_MINIMUM: 3.5
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source"
fetch-depth: 0
lfs: false
- name: Python CI
uses: ./source/.github/actions/python-ci
with:
versions_file: ./source/.github/workflows/versions.json
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
cpu: ${{ matrix.os == 'macos-15' && 'arm64' || 'x86_64' }}
python_version: ${{matrix.python_version}}
#----------------------------------------------------------------------------
# Coverage: Build and test on linux with last VTK with coverage option
#----------------------------------------------------------------------------
coverage:
needs: cache_lfs
if: |
contains(github.event.pull_request.labels.*.name, 'ci:coverage') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
runs-on: ubuntu-24.04
container: ghcr.io/f3d-app/f3d-ci
env:
DISPLAY: :0
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source"
fetch-depth: 0
lfs: false
- name: Coverage CI
uses: ./source/.github/actions/coverage-ci
with:
versions_file: ./source/.github/workflows/versions.json
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
codecov_token: ${{secrets.CODECOV_TOKEN}}
#----------------------------------------------------------------------------
# Sanitizer: Build and test on linux with last VTK with sanitizer options
#----------------------------------------------------------------------------
# "leak" is run by default with "address" so we do not need to run it in CI
# "memory" returns false positives in VTK:
# https://stackoverflow.com/questions/60097307/memory-sanitizer-reports-use-of-uninitialized-value-in-global-object-constructio
sanitizer:
needs: cache_lfs
if: |
contains(github.event.pull_request.labels.*.name, 'ci:sanitizer') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
strategy:
fail-fast: false
matrix:
sanitizer_type: [address, thread, undefined]
runs-on: ubuntu-24.04
container: ghcr.io/f3d-app/f3d-ci
env:
CMAKE_POLICY_VERSION_MINIMUM: 3.5
DISPLAY: :0
CC: clang
CXX: clang++
VTK_SMP_BACKEND_IN_USE: Sequential
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source"
fetch-depth: 0
lfs: false
- name: Sanitizer CI
uses: ./source/.github/actions/sanitizer-ci
with:
versions_file: ./source/.github/workflows/versions.json
sanitizer_type: ${{matrix.sanitizer_type}}
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
#----------------------------------------------------------------------------
# static-analysis: Run static analysis on linux
#----------------------------------------------------------------------------
static-analysis:
needs: cache_lfs
if: |
contains(github.event.pull_request.labels.*.name, 'ci:analysis') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
strategy:
fail-fast: false
runs-on: ubuntu-24.04
container: ghcr.io/f3d-app/f3d-ci
env:
CMAKE_POLICY_VERSION_MINIMUM: 3.5
CC: clang
CXX: clang++
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source"
fetch-depth: 0
lfs: false
- name: Static analysis CI
uses: ./source/.github/actions/static-analysis-ci
with:
versions_file: ./source/.github/workflows/versions.json
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
#----------------------------------------------------------------------------
# external-build: Check build of F3D as sub-project
#----------------------------------------------------------------------------
external-build:
if: |
contains(github.event.pull_request.labels.*.name, 'ci:external') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
strategy:
fail-fast: false
runs-on: ubuntu-24.04
container: ghcr.io/f3d-app/f3d-ci
env:
CMAKE_POLICY_VERSION_MINIMUM: 3.5
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source/f3d"
fetch-depth: 0
lfs: false
- name: External build CI
uses: ./source/f3d/.github/actions/external-build-ci
with:
versions_file: ./source/f3d/.github/workflows/versions.json
#----------------------------------------------------------------------------
# Recover docker timestamp
#----------------------------------------------------------------------------
recover_docker_timestamp:
name: Recover docker timestamp
runs-on: ubuntu-24.04
if: |
contains(github.event.pull_request.labels.*.name, 'ci:android') ||
contains(github.event.pull_request.labels.*.name, 'ci:wasm') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
outputs:
docker_timestamp: ${{steps.docker_timestamp.outputs.extract}}
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source"
fetch-depth: 0
lfs: false
- name: Extract docker timestamp
id: docker_timestamp
uses: f3d-app/extract-version-action@main
with:
file: ./source/.github/workflows/versions.json
special_name: docker_timestamp
#----------------------------------------------------------------------------
# android: Check build of F3D for android
#----------------------------------------------------------------------------
android:
needs: recover_docker_timestamp
if: |
contains(github.event.pull_request.labels.*.name, 'ci:android') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
strategy:
fail-fast: false
matrix:
arch: [armeabi-v7a, arm64-v8a, x86, x86_64]
runs-on: ubuntu-24.04
container: ghcr.io/f3d-app/f3d-android-${{ matrix.arch }}:${{needs.recover_docker_timestamp.outputs.docker_timestamp}}
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source"
fetch-depth: 0
lfs: false
- name: Android CI
uses: ./source/.github/actions/android-ci
with:
arch: ${{matrix.arch}}
#----------------------------------------------------------------------------
# webassembly: Build webassembly artifacts
#----------------------------------------------------------------------------
webassembly:
needs: [cache_lfs, recover_docker_timestamp]
if: |
contains(github.event.pull_request.labels.*.name, 'ci:wasm') ||
contains(github.event.pull_request.labels.*.name, 'ci:full') ||
github.ref == 'refs/heads/master'
strategy:
fail-fast: false
runs-on: ubuntu-24.04
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
F3D_DOCKER_TIMESTAMP: ${{needs.recover_docker_timestamp.outputs.docker_timestamp}}
steps:
- name: Checkout
uses: actions/checkout@v7
with:
path: "source"
fetch-depth: 0
lfs: false
- name: WebAssembly CI
uses: ./source/.github/actions/wasm-ci
with:
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
- name: Install dependencies
working-directory: ${{github.workspace}}/source/examples/libf3d/web
run: npm install
- name: Build F3D web app with npm F3D package
working-directory: ${{github.workspace}}/source/examples/libf3d/web
run: npm run build --workspaces
- name: Retrieve f3d package
uses: actions/download-artifact@v8
with:
name: f3d-wasm-package
path: ${{github.workspace}}/source/examples/libf3d/web
# Override with the locally built package
- name: Install f3d package
working-directory: ${{github.workspace}}/source/examples/libf3d/web
run: npm install f3d-*.tgz --workspaces
- name: Build F3D web app with package just built from branch
working-directory: ${{github.workspace}}/source/examples/libf3d/web
run: npm run build --workspaces