-
-
Notifications
You must be signed in to change notification settings - Fork 221
405 lines (340 loc) · 11.4 KB
/
ci.yml
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
name: CI
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
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-latest
name: Update LFS data cache
outputs:
lfs_sha: ${{ steps.lfs_sha_recover.outputs.lfs_sha }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
fetch-depth: 1
lfs: false
- name: Cache LFS Data
id: lfs_sha_recover
uses: f3d-app/lfs-data-cache-action@v1
with:
cache_postfix: cache-0
#----------------------------------------------------------------------------
# Windows CI: Build and test, cross-vtk build matrix
#----------------------------------------------------------------------------
windows:
if: github.event.pull_request.draft == false
needs: cache_lfs
strategy:
fail-fast: false
matrix:
vtk_version: [commit, v9.4.0, v9.3.1, v9.2.6]
static_label: [no-static]
include:
- vtk_version: commit
static_label: static
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
fetch-depth: 0
lfs: false
- name: Generic CI
uses: ./source/.github/actions/generic-ci
with:
vtk_version: ${{matrix.vtk_version}}
raytracing_label: raytracing
static_label: ${{matrix.static_label}}
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
#----------------------------------------------------------------------------
# Linux CI: Build and test, cross-vtk build matrix
#----------------------------------------------------------------------------
linux:
if: github.event.pull_request.draft == false
needs: cache_lfs
strategy:
fail-fast: false
matrix:
vtk_version: [commit, v9.4.0, v9.3.1, v9.2.6]
build_type: [standard]
include:
- raytracing_label: raytracing
- exclude_deprecated_label: no-exclude-deprecated
- optional_deps_label: optional-deps
- rendering_backend: auto
- static_label: no-static
- build_type: egl
vtk_version: commit
raytracing_label: raytracing
optional_deps_label: optional-deps
exclude_deprecated_label: no-exclude-deprecated
rendering_backend: egl
static_label: no-static
- build_type: osmesa
vtk_version: commit
raytracing_label: raytracing
optional_deps_label: optional-deps
exclude_deprecated_label: no-exclude-deprecated
rendering_backend: osmesa
static_label: no-static
- build_type: exclude_deprecated
vtk_version: commit
raytracing_label: raytracing
optional_deps_label: optional-deps
exclude_deprecated_label: exclude-deprecated
rendering_backend: auto
static_label: no-static
- build_type: no_optional_deps
vtk_version: commit
raytracing_label: no-raytracing
optional_deps_label: no-optional-deps
exclude_deprecated_label: no-exclude-deprecated
rendering_backend: auto
static_label: no-static
- build_type: static_libs
vtk_version: commit
raytracing_label: no-raytracing
optional_deps_label: optional-deps
exclude_deprecated_label: no-exclude-deprecated
rendering_backend: auto
static_label: static
runs-on: ubuntu-latest
container: ghcr.io/f3d-app/f3d-ci
env:
DISPLAY: :0
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
fetch-depth: 0
lfs: false
- name: Generic CI
uses: ./source/.github/actions/generic-ci
with:
build_type: ${{matrix.build_type}}
vtk_version: ${{matrix.vtk_version}}
raytracing_label: ${{matrix.raytracing_label}}
rendering_backend: ${{matrix.rendering_backend}}
optional_deps_label: ${{matrix.optional_deps_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:
if: github.event.pull_request.draft == false
needs: cache_lfs
strategy:
fail-fast: false
matrix:
vtk_version: [commit, v9.4.0, v9.3.1, v9.2.6]
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
fetch-depth: 0
lfs: false
- name: Generic CI
uses: ./source/.github/actions/generic-ci
with:
vtk_version: ${{matrix.vtk_version}}
raytracing_label: raytracing
cpu: x86_64
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
#----------------------------------------------------------------------------
# MacOS ARM CI: Build and test, cross-vtk build matrix with a few optional builds
#----------------------------------------------------------------------------
macos_arm:
if: github.event.pull_request.draft == false
needs: cache_lfs
strategy:
fail-fast: false
matrix:
vtk_version: [commit, v9.4.0, v9.3.1] # VTK 9.2.6 not compatible with recent clang version on macOS
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-14
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
fetch-depth: 0
lfs: false
- name: Generic CI
uses: ./source/.github/actions/generic-ci
with:
vtk_version: ${{matrix.vtk_version}}
raytracing_label: raytracing
bundle_label: ${{matrix.bundle_label}}
static_label: ${{matrix.static_label}}
cpu: arm64
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
#----------------------------------------------------------------------------
# Python packaging: Build and test the Python wheel
#----------------------------------------------------------------------------
python-packaging:
if: github.event.pull_request.draft == false
needs: cache_lfs
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
runs-on: ${{matrix.os}}
container: ${{ matrix.os == 'ubuntu-latest' && 'ghcr.io/f3d-app/f3d-ci' || null }}
env:
DISPLAY: :0
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
fetch-depth: 0
lfs: false
- name: Python CI
uses: ./source/.github/actions/python-ci
with:
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
#----------------------------------------------------------------------------
# Coverage: Build and test on linux with last VTK with coverage option
#----------------------------------------------------------------------------
coverage:
needs: cache_lfs
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container: ghcr.io/f3d-app/f3d-ci
# Add dummy F3D_PLUGINS_PATH for coverage
env:
DISPLAY: :0
F3D_PLUGINS_PATH: /dummy1:/dummy2
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
fetch-depth: 0
lfs: false
- name: Coverage CI
uses: ./source/.github/actions/coverage-ci
with:
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: github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:
sanitizer_type: [address, thread, undefined]
runs-on: ubuntu-latest
container: ghcr.io/f3d-app/f3d-ci
env:
DISPLAY: :0
CC: clang
CXX: clang++
VTK_SMP_BACKEND_IN_USE: Sequential
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
fetch-depth: 0
lfs: false
- name: Sanitizer CI
uses: ./source/.github/actions/sanitizer-ci
with:
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: github.event.pull_request.draft == false
strategy:
fail-fast: false
runs-on: ubuntu-latest
container: ghcr.io/f3d-app/f3d-ci
env:
CC: clang
CXX: clang++
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
fetch-depth: 0
lfs: false
- name: Static analysis CI
uses: ./source/.github/actions/static-analysis-ci
with:
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
#----------------------------------------------------------------------------
# external-build: Check build of F3D as sub-project
#----------------------------------------------------------------------------
external-build:
if: github.event.pull_request.draft == false
strategy:
fail-fast: false
runs-on: ubuntu-latest
container: ghcr.io/f3d-app/f3d-ci
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source/f3d'
fetch-depth: 0
lfs: false
- name: External build CI
uses: ./source/f3d/.github/actions/external-build-ci
#----------------------------------------------------------------------------
# android: Check build of F3D for android
#----------------------------------------------------------------------------
android:
if: github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:
arch: [armeabi-v7a, arm64-v8a, x86, x86_64]
runs-on: ubuntu-latest
container: ghcr.io/f3d-app/f3d-ci
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
fetch-depth: 0
lfs: false
- name: Android CI
uses: ./source/.github/actions/android-ci
with:
arch: ${{matrix.arch}}