-
Notifications
You must be signed in to change notification settings - Fork 63
200 lines (178 loc) · 7.29 KB
/
continuous-integration.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
name: "Reusable Continuous Integration workflow"
on:
workflow_call:
secrets:
GH_TOKEN:
description: 'A Github PAT'
required: true
CODECOV_TOKEN:
description: 'Needed to upload coverage report to codecov'
required: true
inputs:
draft-release:
# This should be a Boolean, but https://github.com/actions/runner/issues/1483
description: "Set to true, if the workflow shall draft a release"
required: false
default: "false"
type: string
tigl_nightly:
description: "CMake option to amend the version with the git hash (ON or OFF). Should be OFF for release builds."
required: false
default: "ON"
type: string
tigl_concat_generated_files:
description: "CMake option to concatenate the generated source files (ON or OFF). Should be OFF for release builds."
required: false
default: "ON"
type: string
integration-tests:
# This should be a Boolean, but https://github.com/actions/runner/issues/1483
description: "Run integration tests"
required: false
default: "false"
type: string
documentation-artifact:
description: "Name of the html documentation artifact. Will be build on Windows. Leave empty to skip documentation build."
required: false
default: ''
type: string
win-package-artifact:
description: "Name of the windows package artifact. Leave empty to skip building the package."
required: false
default: ''
type: string
win-installer-artifact:
description: "Name of the windows installer artifact. Leave empty to skip building the installer."
required: false
default: ''
type: string
macos-package-artifact:
description: "Name of the Mac OS package artifact. Leave empty to skip building the package."
required: false
default: ''
type: string
jobs:
build-linux:
strategy:
matrix:
config: ["Debug", "Release"]
os: ["ubuntu-latest", "ubuntu-22.04"]
# only enable coverage for Debug build on latest ubuntu
include:
- config: "Debug"
os: "ubuntu-latest"
coverage: "ON"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-linux
with:
config: ${{ matrix.config }}
tigl_nightly: ${{ inputs.tigl_nightly }}
tigl_concat_generated_files: ${{ inputs.tigl_concat_generated_files }}
tigl_enable_coverage: ${{ matrix.coverage || 'OFF' }}
build-artifact: build-${{ matrix.os }}-${{ matrix.config }}-nightly-${{ inputs.tigl_nightly }}-concat-${{ inputs.tigl_concat_generated_files }}-cov-${{ matrix.coverage || 'OFF' }}
test-linux:
needs: build-linux
strategy:
matrix:
config: ["Debug", "Release"]
os: ["ubuntu-latest", "ubuntu-22.04"]
unit-tests: [true]
# generate coverage reports on latest ubuntu debug builds
exclude:
- config: "Debug"
os: "ubuntu-latest"
include:
- config: "Debug"
os: "ubuntu-latest"
coverage: "ON"
unit-tests: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-linux
with:
build-artifact: build-${{ matrix.os }}-${{ matrix.config }}-nightly-${{ inputs.tigl_nightly }}-concat-${{ inputs.tigl_concat_generated_files }}-cov-${{ matrix.coverage || 'OFF' }}
coverage: ${{ matrix.coverage == 'ON' || false }}
unit-tests: ${{ matrix.unit-tests }}
integration-tests: ${{ inputs.integration-tests == 'true' || false }}
codecov_token: ${{ secrets.CODECOV_TOKEN }}
build-windows:
strategy:
matrix:
config: ["Release"]
os: ["windows-2019", "windows-latest"]
include:
- config: "Release"
os: "windows-2019"
oce_static_libs: "ON"
tigl_bindings_python_internal: "ON"
documentation-artifact: ${{ inputs.documentation-artifact }}
package-artifact: ${{ inputs.win-package-artifact }}
installer-artifact: ${{ inputs.win-installer-artifact }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-win
with:
config: ${{ matrix.config }}
tigl_nightly: ${{ inputs.tigl_nightly =='true' }}
tigl_concat_generated_files: ${{ inputs.tigl_concat_generated_files == 'true' }}
tigl_enable_coverage: 'OFF'
oce_static_libs: ${{ matrix.oce_static_libs || 'OFF' }}
tigl_bindings_python_internal: ${{ matrix.tigl_bindings_python_internal || 'OFF' }}
documentation-artifact: ${{ matrix.documentation-artifact }}
package-artifact: ${{ matrix.package-artifact }}
installer-artifact: ${{ matrix.installer-artifact }}
build-artifact: build-${{ matrix.os }}-${{ matrix.config }}-nightly-${{ inputs.tigl_nightly }}-concat-${{ inputs.tigl_concat_generated_files }}-cov-OFF-static-${{ matrix.oce_static_libs || 'OFF' }}-python-${{ matrix.tigl_bindings_python_internal || 'OFF' }}
test-windows:
needs: build-windows
strategy:
matrix:
config: ["Release"]
os: ["windows-2019", "windows-latest"]
include:
- config: "Release"
os: "windows-2019"
oce_static_libs: "ON"
tigl_bindings_python_internal: "ON"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-win
with:
build-artifact: build-${{ matrix.os }}-${{ matrix.config }}-nightly-${{ inputs.tigl_nightly }}-concat-${{ inputs.tigl_concat_generated_files }}-cov-OFF-static-${{ matrix.oce_static_libs || 'OFF' }}-python-${{ matrix.tigl_bindings_python_internal || 'OFF' }}
unit-tests: true
integration-tests: ${{ inputs.integration-tests == 'true' }}
build-macos:
runs-on: "macos-13"
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-macos
with:
config: "Release"
tigl_nightly: ${{ inputs.tigl_nightly =='true' }}
tigl_concat_generated_files: ${{ inputs.tigl_concat_generated_files == 'true' }}
tigl_enable_coverage: 'OFF'
package-artifact: ${{ inputs.macos-package-artifact }}
build-artifact: build-macos-13-Release-nightly-${{ inputs.tigl_nightly }}-concat-${{ inputs.tigl_concat_generated_files }}-cov-OFF-static-ON-python-OFF
test-macos:
needs: build-macos
runs-on: "macos-13"
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-macos
with:
build-artifact: build-macos-13-Release-nightly-${{ inputs.tigl_nightly }}-concat-${{ inputs.tigl_concat_generated_files }}-cov-OFF-static-ON-python-OFF
unit-tests: true
integration-tests: ${{ inputs.integration-tests == 'true' }}
draft-release:
if: ${{ inputs.draft-release == 'true' }}
needs: ["test-macos", "test-windows", "test-linux"]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/release
with:
GH_TOKEN: ${{ secrets.GH_TOKEN }}