forked from OpenFAST/openfast
-
Notifications
You must be signed in to change notification settings - Fork 0
324 lines (293 loc) · 11.3 KB
/
automated-dev-tests.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
name: 'Development Pipeline'
on:
push:
paths-ignore:
- 'LICENSE'
- 'README.rst'
- 'docs/**'
- 'share/**'
- 'vs-build/**'
pull_request:
types: [opened, synchronize, edited, reopened] #labeled, assigned]
# Pull request event triggers are unrelated to paths
# paths-ignore:
env:
FORTRAN_COMPILER: gfortran-10
NUM_PROCS: 8
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [macOS-10.14, ubuntu-18.04]
jobs:
regression-tests-release:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@main
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
- name: Setup Workspace
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure Build
working-directory: ${{runner.workspace}}/build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
-DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DBUILD_TESTING:BOOL=ON \
-DCTEST_PLOT_ERRORS:BOOL=ON \
${GITHUB_WORKSPACE}
- name: Build OpenFAST
# if: contains(github.event.head_commit.message, 'Action - Test All') || contains(github.event.pull_request.labels.*.name, 'Action - Test All')
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target install -- -j ${{env.NUM_PROCS}}
- name: Run AeroDyn tests
uses: ./.github/actions/tests-module-aerodyn
with:
test-target: regression
- name: Run BeamDyn tests
uses: ./.github/actions/tests-module-beamdyn
with:
test-target: regression
- name: Run HydroDyn tests
uses: ./.github/actions/tests-module-hydrodyn
- name: Run SubDyn tests
uses: ./.github/actions/tests-module-subdyn
- name: Run OpenFAST tests
# if: contains(github.event.head_commit.message, 'Action - Test All') || contains(github.event.pull_request.labels.*.name, 'Action - Test All')
uses: ./.github/actions/tests-gluecode-openfast
- name: Failing test artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: regression-tests-release
path: |
${{runner.workspace}}/build/reg_tests/modules
${{runner.workspace}}/build/reg_tests/glue-codes/openfast
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast/5MW_Baseline
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast/AOC
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast/AWT27
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast/SWRT
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast/UAE_VI
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast/WP_Baseline
regression-tests-debug:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@main
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
- name: Setup Workspace
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure Build
working-directory: ${{runner.workspace}}/build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
-DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DBUILD_TESTING:BOOL=ON \
-DCTEST_PLOT_ERRORS:BOOL=ON \
${GITHUB_WORKSPACE}
- name: Build OpenFAST
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --target aerodyn_driver -- -j ${{env.NUM_PROCS}}
cmake --build . --target beamdyn_driver -- -j ${{env.NUM_PROCS}}
cmake --build . --target hydrodyn_driver -- -j ${{env.NUM_PROCS}}
cmake --build . --target subdyn_driver -- -j ${{env.NUM_PROCS}}
- name: Run AeroDyn tests
uses: ./.github/actions/tests-module-aerodyn
with:
test-target: regression
- name: Run BeamDyn tests
uses: ./.github/actions/tests-module-beamdyn
with:
test-target: regression
- name: Run HydroDyn tests
uses: ./.github/actions/tests-module-hydrodyn
- name: Run SubDyn tests
uses: ./.github/actions/tests-module-subdyn
- name: Failing test artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: regression-tests-debug
path: |
${{runner.workspace}}/build/reg_tests/modules
fastfarm-regression-test:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@main
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
- name: Setup Workspace
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure Build
working-directory: ${{runner.workspace}}/build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
-DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
-DOPENMP:BOOL=ON \
-DBUILD_FASTFARM:BOOL=ON \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DBUILD_TESTING:BOOL=ON \
-DCTEST_PLOT_ERRORS:BOOL=ON \
${GITHUB_WORKSPACE}
- name: Build FAST.Farm
# if: contains(github.event.head_commit.message, 'Action - Test All') || contains(github.event.pull_request.labels.*.name, 'Action - Test All')
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --target FAST.Farm -- -j ${{env.NUM_PROCS}}
cmake --build . --target regression_tests -- -j ${{env.NUM_PROCS}}
- name: Run FAST.Farm tests
# if: contains(github.event.head_commit.message, 'Action - Test All') || contains(github.event.pull_request.labels.*.name, 'Action - Test All')
run: |
ctest -VV -L fastfarm -j ${{env.NUM_PROCS}}
working-directory: ${{runner.workspace}}/build
shell: bash
- name: Failing test artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-results
path: |
${{runner.workspace}}/build/reg_tests/glue-codes/fastfarm
unit-test:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@main
with:
submodules: recursive
- name: Setup
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure
working-directory: ${{runner.workspace}}/build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
-DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DBUILD_TESTING:BOOL=ON \
${GITHUB_WORKSPACE}
- name: Build unit tests
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target unit_tests -- -j ${{env.NUM_PROCS}}
- name: Run NWTC Library tests
uses: ./.github/actions/tests-module-nwtclibrary
- name: Run AeroDyn tests
uses: ./.github/actions/tests-module-aerodyn
with:
test-target: unit
- name: Run BeamDyn tests
uses: ./.github/actions/tests-module-beamdyn
with:
test-target: unit
- name: Run InflowWind tests
uses: ./.github/actions/tests-module-inflowwind
compile-all-single-precision:
# Test if single precision compile completes.
# Compiles all targets excluding tests.
# Run with the OpenFAST registry generating the types files.
# Do not run the test suite.
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@main
with:
submodules: recursive
- name: Setup
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure
working-directory: ${{runner.workspace}}/build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
-DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DDOUBLE_PRECISION:BOOL=OFF \
-DGENERATE_TYPES:BOOL=ON \
${GITHUB_WORKSPACE}
- name: Build all
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target all -- -j ${{env.NUM_PROCS}}
- name: Test
working-directory: ${{runner.workspace}}/build
run: ./glue-codes/openfast/openfast -v
cpp-interface-tests:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@main
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy Bokeh==1.4
sudo apt-get update
sudo apt-get install -y libhdf5-dev libopenmpi-dev libyaml-cpp-dev
- name: Setup Workspace
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure Build
working-directory: ${{runner.workspace}}/build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install \
-DCMAKE_Fortran_COMPILER:STRING=${{env.FORTRAN_COMPILER}} \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DBUILD_OPENFAST_CPP_API:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_TESTING:BOOL=ON \
-DCTEST_PLOT_ERRORS:BOOL=ON \
${GITHUB_WORKSPACE}
- name: Build OpenFAST C++ API
# if: contains(github.event.head_commit.message, 'Action - Test All') || contains(github.event.pull_request.labels.*.name, 'Action - Test All')
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --target openfastcpp -- -j ${{env.NUM_PROCS}}
cmake --build . --target regression_tests -- -j ${{env.NUM_PROCS}}
- name: Run OpenFAST C++ API tests
working-directory: ${{runner.workspace}}/build
run: |
ctest -VV -L cpp
- name: Failing test artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-results
path: |
${{runner.workspace}}/build/reg_tests/glue-codes/openfast-cpp
!${{runner.workspace}}/build/reg_tests/glue-codes/openfast-cpp/5MW_Baseline