-
Notifications
You must be signed in to change notification settings - Fork 13
489 lines (427 loc) · 14.7 KB
/
modules.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
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
name: "Build Inviwo Modules"
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
permissions:
contents: write # Enable vcpkg to write to the dependency graph
env:
VCPKG_BINARY_SOURCES: 'clear;http,https://jenkins.inviwo.org/cache/{sha},readwrite,Authorization: Bearer ${{ secrets.VCPKG_CACHE_TOKEN }}'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VCPKG_FEATURE_FLAGS: dependencygraph
# QT_DEBUG_PLUGINS: 1 # print qt plugin debug info
# Information about the github runners can be found here
# https://github.com/actions/runner-images
jobs:
build:
name: "Build"
strategy:
matrix:
system: [windows, macos, linux]
linkage: [dynamic, static]
configuration: [Release, Debug]
include:
- system: windows
os: 'windows-2022'
targets: 'ALL_BUILD'
installer: 'inviwo-installer-win'
artifact: 'build/inviwo-v*.exe'
run: |
./Release/inviwo-cli.exe --logconsole --quit
if [ $? -nq 0 ]
then
C:/'Program Files (x86)'/'Windows Kits'/10/Debuggers/x64/gflags.exe /i ./Release/inviwo-cli.exe +sls
C:/'Program Files (x86)'/'Windows Kits'/10/Debuggers/x64/cdb.exe -g -c q ./Release/inviwo-cli.exe
fi
- system: macos
os: 'macos-15'
targets: 'ALL_BUILD'
installer: 'inviwo-installer-macos'
artifact: 'build/inviwo-v*.dmg'
- system: linux
os: 'ubuntu-24.04'
targets: 'all'
installer: 'inviwo-installer-ubuntu'
artifact: 'build/inviwo-v*.deb'
run: QT_QPA_PLATFORM=offscreen ./inviwo --logconsole --quit
# set triplets
- system: 'windows'
linkage: 'dynamic'
triplet: 'x64-windows'
- system: 'windows'
linkage: 'static'
triplet: 'x64-windows-static-md'
- system: 'macos'
linkage: 'dynamic'
triplet: 'arm64-osx-dynamic'
- system: 'macos'
linkage: 'static'
triplet: 'arm64-osx'
- system: 'linux'
linkage: 'dynamic'
triplet: 'x64-linux-dynamic'
- system: 'linux'
linkage: 'static'
triplet: 'x64-linux'
# Run
- system: 'macos'
configuration: Release
run: './Release/inviwo.app/Contents/MacOS/inviwo --logconsole --quit'
- system: 'macos'
configuration: Debug
run: './Debug/inviwo.app/Contents/MacOS/inviwo --logconsole --quit'
# extra targets
- system: windows
linkage: dynamic
configuration: Release
targets: 'ALL_BUILD DOXY-Inviwo DOXY-Python package'
#- system: macos # Disable mac packaging since it probably runs out of diskspace
# linkage: dynamic
# configuration: Release
# targets: 'all package'
- system: linux
linkage: dynamic
configuration: Release
targets: 'all package'
exclude:
# Windows debug build are to big, they run out of diskspace
- system: windows
configuration: Debug
# This build fails very close to the end with "ninja: build stopped: interrupted by user."
- system: linux
linkage: static
configuration: Debug
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 360
steps:
- name: "Clone Modules"
uses: actions/checkout@v4
with:
path: modules
submodules: false
- name: "Clone Inviwo"
uses: actions/checkout@v4
with:
repository: inviwo/inviwo
ref: master
path: inviwo
submodules: false
- name: Install dependencies
uses: ./inviwo/.github/actions/install-dependencies
- name: "Brew Install"
shell: bash
if: runner.os == 'macOS'
run: |
brew install bison
- name: Configure build environment
uses: ./inviwo/.github/actions/configure-build-env
with:
triplet: ${{ matrix.triplet }}
configuration: ${{ matrix.configuration }}
- name: Copy Preset
shell: bash
run: cp modules/.github/presets/${{ matrix.system }}.json inviwo/CMakeUserPresets.json
- name: "Configure CMake"
shell: bash
run: >
cmake -S inviwo -B build --preset gha-${{ matrix.linkage }}
-DCMAKE_BUILD_TYPE=${{ matrix.configuration }}
- name: "Build"
timeout-minutes: 360
shell: bash
run: |
echo "::add-matcher::inviwo/.github/matchers/${{ matrix.system }}.json"
cmake --build build --config ${{ matrix.configuration }} --parallel --target ${{ matrix.targets }}
echo "::remove-matcher owner=compiler::"
echo "::remove-matcher owner=linker::"
- name: "Run"
shell: bash
working-directory: "build/bin"
run: ${{ matrix.run }}
- name: "Unittests"
shell: bash
working-directory: "build"
run: ctest -C ${{ matrix.configuration }} --output-on-failure
- name: "Upload installer"
if: matrix.linkage == 'dynamic' && matrix.configuration == 'Release'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.installer }}
path: ${{ matrix.artifact }}
- name: "Upload doxygen"
if: matrix.system == 'windows' && matrix.linkage == 'dynamic' && matrix.configuration == 'Release'
uses: actions/upload-artifact@v4
with:
name: inviwo-cpp-api
path: build/docs/inviwo/html/*
- name: "Upload shpinx"
if: matrix.system == 'windows' && matrix.linkage == 'dynamic' && matrix.configuration == 'Release'
uses: actions/upload-artifact@v4
with:
name: inviwo-python-api
path: build/docs/python-api/*
- name: "Setup tmate session (on failure and debug_enabled)"
if: "${{ failure() && contains( github.event.pull_request.labels.*.name, 'CI: Debug') }}"
uses: mxschmitt/action-tmate@v3
timeout-minutes: 30
with:
limit-access-to-actor: true
- name: "Upload Vcpkg build Logs"
if: "${{ failure() }}"
uses: actions/upload-artifact@v4
with:
name: vcpkg-logs-${{ matrix.system }}-${{ matrix.linkage }}-${{ matrix.configuration }}
path: vcpkg/buildtrees/**/*.log
regression:
name: "Regression"
runs-on: [regression, macOS]
timeout-minutes: 320
steps:
- name: "Clone Modules"
uses: actions/checkout@v4
with:
path: modules
submodules: false
- name: "Clone Inviwo"
uses: actions/checkout@v4
with:
repository: inviwo/inviwo
ref: master
path: inviwo
submodules: false
- name: Copy Preset
shell: bash
run: cp modules/.github/presets/macos.json inviwo/CMakeUserPresets.json
- name: "Configure CMake"
shell: bash
run: >
VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT && cmake -S inviwo -B build --preset gha-dynamic
--toolchain $VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake
-DCMAKE_CXX_FLAGS='-stdlib=libc++'
-DVCPKG_TARGET_TRIPLET=x64-osx-dynamic
-DVCPKG_HOST_TRIPLET=x64-osx-dynamic
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DIVW_MODULE_EIGENUTILS=ON
-DIVW_MODULE_HDF5=ON
-DIVW_MODULE_TETRAMESH=OFF
-DIVW_MODULE_WEBBROWSER=OFF
-DIVW_MODULE_WEBQT=OFF
- name: "Build"
timeout-minutes: 360
shell: bash
run: |
echo "::add-matcher::inviwo/.github/matchers/macos.json"
cmake --build build --config RelWithDebInfo --parallel --target ALL_BUILD
echo "::remove-matcher owner=compiler::"
echo "::remove-matcher owner=linker::"
- name: "Unit Tests"
shell: bash
working-directory: "build"
continue-on-error: true
run: ctest -C RelWithDebInfo --output-on-failure
- name: "Integration Tests"
shell: bash
working-directory: "build/bin"
continue-on-error: true
run: ./inviwo-integrationtests
- name: "Clone Regression"
uses: actions/checkout@v4
with:
repository: inviwo/regression
ref: main
token: ${{ secrets.INVIWO_TEAM_SECRET }}
path: regression
- name: "Regression Tests"
shell: bash
continue-on-error: true
run: |
mkdir -p regression/modules/macos/${{ github.ref }}
python3 inviwo/tools/regression.py \
--config build/pyconfig.ini \
--build_type RelWithDebInfo \
--output regression/modules/macos/${{ github.ref }} \
--modules inviwo/modules \
--summary
- name: Push report
shell: bash
run: |
cd regression
git config --global user.name 'Inviwo-Team'
git config --global user.email '[email protected]'
git add .
git commit -am "Regression report for macos ${{ github.ref }}"
git push
echo "### :chart_with_upwards_trend: Regression report at https://inviwo.org/regression/modules/macos/${{ github.ref }}/report.html " >> $GITHUB_STEP_SUMMARY
clang-tidy:
name: "Clang-tidy"
if: github.ref != 'refs/heads/master'
permissions:
pull-requests: write
env:
LLVM_VERSION: 17
runs-on: ubuntu-24.04
timeout-minutes: 320
steps:
- name: "Clone Modules"
uses: actions/checkout@v4
with:
path: modules
submodules: false
- name: "Clone Inviwo"
uses: actions/checkout@v4
with:
repository: inviwo/inviwo
ref: master
path: inviwo
submodules: false
- name: "Install dependencies"
uses: ./inviwo/.github/actions/install-dependencies
with:
linux-compilter: clang
clang-version: ${{ env.LLVM_VERSION }}
- name: "Configure build environment"
uses: ./inviwo/.github/actions/configure-build-env
with:
triplet: x64-linux-dynamic
configuration: Release
ccache: false
- name: "Copy Preset"
shell: bash
run: cp modules/.github/presets/linux.json inviwo/CMakeUserPresets.json
- name: "Configure CMake"
shell: bash
run: >
cmake -S inviwo -B build --preset gha-dynamic
-DCMAKE_CXX_FLAGS='-stdlib=libc++'
-DVCPKG_INSTALL_OPTIONS='--clean-after-build'
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DIVW_MODULE_WEBBROWSER=ON
-DIVW_MODULE_SGCT=ON
-DIVW_APP_INVIWO_DOME=ON
-DVCPKG_MANIFEST_FEATURES="sgct;graphviz;openmesh;nanovg"
- name: "Run clang-tidy"
uses: cpp-linter/[email protected]
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repo-root: inviwo
database: ../build
style: 'file'
tidy-checks: ''
version: ${{ env.LLVM_PATH }}
tidy-review: true
format-review: false
step-summary: true
no-lgtm: false
lines-changed-only: true
thread-comments: update
file-annotations: false
verbosity: debug
- name: "Setup tmate session (on failure and debug_enabled)"
if: "${{ failure() && contains( github.event.pull_request.labels.*.name, 'CI: Debug') }}"
uses: mxschmitt/action-tmate@v3
timeout-minutes: 30
with:
limit-access-to-actor: true
test-installer:
name: "Test Installer"
needs: build
strategy:
fail-fast: false
matrix:
os: [windows-latest] # macos-latest,
include:
- os: 'windows-latest'
installer: 'inviwo-installer-win'
#- os: 'macos-latest'
# installer: 'inviwo-installer-macos'
runs-on: ${{ matrix.os }}
steps:
- name: "Download artifact"
uses: actions/download-artifact@v4
with:
name: ${{ matrix.installer }}
# Windows
- name: "Run Windows Installer"
if: runner.os == 'Windows'
shell: pwsh
run: |
# find the name of the installer
$exe = Get-ChildItem -Name inviwo-*.exe
# launch the nsis installer in "silent mode" (/S), should run without user interaction
Invoke-expression "./$exe /S"
# this will spawn the installer in the background so we need to wait for it to finish
$proc = Get-Process | where {$_.ProcessName -like "inviwo-*"} | Select-Object -First 1
if ($proc) {
Wait-Process -Id $proc.id
}
- name: "Run Inviwo"
if: runner.os == 'Windows'
shell: pwsh
run: |
$ver = (Get-ChildItem -Name C:/"Program Files"/Inviwo/*)
cd C:/'Program Files'/Inviwo/$ver/bin/
./inviwo-cli.exe --logconsole --quit
if ($LASTEXITCODE -ne 0) {
C:\'Program Files (x86)'\'Windows Kits'\10\Debuggers\x64\gflags.exe /i inviwo-cli.exe +sls
C:\'Program Files (x86)'\'Windows Kits'\10\Debuggers\x64\cdb.exe -g -c q inviwo-cli.exe
}
# Macos
- name: "Run MacOS Installer"
if: runner.os == 'macOS'
shell: bash
run: |
# Find the name of the installer
DMG=$(ls Inviwo-*.dmg)
# Mount installer image
hdiutil attach $DMG
# Install by copying Inviwo.app to applications folder
cp -r /Volumes/${DMG%%.dmg}/Inviwo.app /Applications/
hdiutil detach /Volumes/${DMG%%.dmg}/
- name: "Run Inviwo"
if: runner.os == 'macOS'
shell: bash
run: |
cd /Applications/Inviwo.app/Contents/MacOS/
./inviwo --logconsole --quit
- name: "Setup tmate session (on failure and debug_enabled)"
if: "${{ failure() && contains( github.event.pull_request.labels.*.name, 'CI: Debug') }}"
uses: mxschmitt/action-tmate@v3
timeout-minutes: 30
with:
limit-access-to-actor: true
create-changelog:
name: "Create Changelog"
runs-on: ubuntu-latest
steps:
- name: "Generate Changelog"
id: changelog
uses: mikepenz/release-changelog-builder-action@v5
with:
toTag: ${{ github.ref }}
outputFile: changelog.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Log Changelog"
shell: bash
run: |
echo "-- Changes --"
echo "${{ steps.changelog.outputs.changelog }}"
echo "-- End --"
- name: "Upload Changelog"
uses: actions/upload-artifact@v3
with:
name: changelog.md
path: changelog.md