-
Notifications
You must be signed in to change notification settings - Fork 846
394 lines (392 loc) · 15.4 KB
/
regression.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
name: Regression and Unit Testing
on:
push:
branches:
- 'develop'
- 'master'
pull_request:
branches:
- 'develop'
- 'master'
workflow_call:
inputs:
runner:
description: 'The github runner to use'
default: 'ubuntu-latest'
required: false
type: string
jobs:
build:
name: Build SU2
strategy:
fail-fast: false
matrix:
config_set: [BaseMPI, ReverseMPI, ForwardMPI, BaseNoMPI, ReverseNoMPI, ForwardNoMPI, BaseOMP, ReverseOMP, ForwardOMP]
include:
- config_set: BaseMPI
flags: '-Denable-pywrapper=true -Denable-coolprop=true -Denable-mpp=true -Dinstall-mpp=true -Denable-mlpcpp=true -Denable-tests=true --warnlevel=2'
- config_set: ReverseMPI
flags: '-Denable-autodiff=true -Denable-normal=false -Denable-pywrapper=true -Denable-tests=true --warnlevel=3 --werror'
- config_set: ForwardMPI
flags: '-Denable-directdiff=true -Denable-normal=false -Denable-tests=true --warnlevel=3 --werror'
- config_set: BaseNoMPI
flags: '-Denable-pywrapper=true -Denable-openblas=true -Dwith-mpi=disabled -Denable-mlpcpp=true -Denable-tests=true --warnlevel=3 --werror'
- config_set: ReverseNoMPI
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-pywrapper=true -Denable-tests=true --warnlevel=3 --werror'
- config_set: ForwardNoMPI
flags: '-Denable-directdiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-tests=true --warnlevel=3 --werror'
- config_set: BaseOMP
flags: '-Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
- config_set: ReverseOMP
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
- config_set: ForwardOMP
flags: '-Denable-directdiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
steps:
- name: Cache Object Files
uses: actions/cache@v4
with:
path: ccache
key: ${{ matrix.config_set }}-${{ github.sha }}
restore-keys: ${{ matrix.config_set }}
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/build-su2:240320-1536
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
- name: Build
uses: docker://ghcr.io/su2code/su2/build-su2:240320-1536
with:
args: -b ${{github.ref}} -f "${{matrix.flags}}"
- name: Compress binaries
run: tar -zcvf install_bin.tgz install/*
- name: Upload Binaries
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config_set }}
path: install_bin.tgz
- name: Post Cleanup
uses: docker://ghcr.io/su2code/su2/build-su2:240320-1536
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
build_tsan:
name: Build SU2 (tsan)
if: inputs.runner != 'ARM64'
strategy:
fail-fast: false
matrix:
config_set: [BaseOMP-tsan, ReverseOMP-tsan] #ForwardOMP-tsan
include:
- config_set: BaseOMP-tsan
flags: '--buildtype=debugoptimized -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3'
- config_set: ReverseOMP-tsan
flags: '--buildtype=debugoptimized -Denable-autodiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3'
#- config_set: ForwardOMP-tsan
# flags: '--buildtype=debug -Denable-directdiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
steps:
- name: Cache Object Files
uses: actions/cache@v4
with:
path: ccache
key: ${{ matrix.config_set }}-${{ github.sha }}
restore-keys: ${{ matrix.config_set }}
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/build-su2-tsan:240320-1536
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
- name: Build
uses: docker://ghcr.io/su2code/su2/build-su2-tsan:240320-1536
with:
args: -b ${{github.ref}} -f "${{matrix.flags}}"
- name: Compress binaries
run: tar -zcvf install_bin.tgz install/*
- name: Upload Binaries
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config_set }}
path: install_bin.tgz
- name: Post Cleanup
uses: docker://ghcr.io/su2code/su2/build-su2-tsan:240320-1536
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
build_asan:
name: Build SU2 (asan)
strategy:
fail-fast: false
matrix:
config_set: [BaseNoMPI-asan, ReverseNoMPI-asan]
include:
- config_set: BaseNoMPI-asan
flags: '--buildtype=debugoptimized -Denable-openblas=true -Dwith-mpi=disabled -Denable-mlpcpp=true --warnlevel=3 --werror'
- config_set: ReverseNoMPI-asan
flags: '--buildtype=debugoptimized -Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled --warnlevel=3 --werror'
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
steps:
- name: Cache Object Files
uses: actions/cache@v4
with:
path: ccache
key: ${{ matrix.config_set }}-${{ github.sha }}
restore-keys: ${{ matrix.config_set }}
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/build-su2-asan:240320-1536
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
- name: Build
run: docker run --rm --cap-add SYS_PTRACE -v $(pwd):${{ github.workspace }} -w ${{ github.workspace }} ghcr.io/su2code/su2/build-su2-asan:240320-1536 -b ${{github.ref}} -f "${{matrix.flags}}"
- name: Compress binaries
run: tar -zcvf install_bin.tgz install/*
- name: Upload Binaries
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config_set }}
path: install_bin.tgz
- name: Post Cleanup
uses: docker://ghcr.io/su2code/su2/build-su2-asan:240320-1536
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
regression_tests:
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
name: Regression Tests
needs: build
strategy:
fail-fast: false
matrix:
testscript: ['vandv.py', 'tutorials.py', 'parallel_regression.py', 'parallel_regression_AD.py', 'serial_regression.py', 'serial_regression_AD.py', 'hybrid_regression.py', 'hybrid_regression_AD.py']
include:
- testscript: 'vandv.py'
tag: MPI
- testscript: 'tutorials.py'
tag: MPI
- testscript: 'parallel_regression.py'
tag: MPI
- testscript: 'parallel_regression_AD.py'
tag: MPI
- testscript: 'serial_regression.py'
tag: NoMPI
- testscript: 'serial_regression_AD.py'
tag: NoMPI
- testscript: 'hybrid_regression.py'
tag: OMP
- testscript: 'hybrid_regression_AD.py'
tag: OMP
steps:
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
- name: Download All artifacts
uses: actions/download-artifact@v4
- name: Uncompress and Move Binaries
run: |
BIN_FOLDER="$PWD/install/bin"
mkdir -p $BIN_FOLDER
ls -lah $BIN_FOLDER
for type in Base Reverse Forward; do
TYPE_FOLDER="${type}${{matrix.tag}}"
echo "Processing '$TYPE_FOLDER' ..."
if [ -d $TYPE_FOLDER ]; then
pushd $TYPE_FOLDER
ls -lah
tar -zxvf install_bin.tgz
ls -lah install/bin/
cp -r install/* $BIN_FOLDER/../
popd;
fi
done
chmod a+x $BIN_FOLDER/*
ls -lahR $BIN_FOLDER
- name: Run Tests in Container
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
thread_sanitizer_tests:
if: inputs.runner != 'ARM64'
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
name: Thread Sanitizer Tests
needs: build_tsan
strategy:
fail-fast: false
matrix:
testscript: ['hybrid_regression.py', 'hybrid_regression_AD.py']
steps:
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
- name: Download All artifacts
uses: actions/download-artifact@v4
- name: Uncompress and Move Binaries
run: |
BIN_FOLDER="$PWD/install/bin"
mkdir -p $BIN_FOLDER
ls -lah $BIN_FOLDER
for type in Base Reverse Forward; do
TYPE_FOLDER="${type}OMP-tsan"
echo "Processing '$TYPE_FOLDER' ..."
if [ -d $TYPE_FOLDER ]; then
pushd $TYPE_FOLDER
ls -lah
tar -zxvf install_bin.tgz
ls -lah install/bin/
cp -r install/* $BIN_FOLDER/../
popd;
fi
done
chmod a+x $BIN_FOLDER/*
ls -lahR $BIN_FOLDER
- name: Run Tests in Container
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tsan"
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
address_sanitizer_tests:
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
name: Address Sanitizer Tests
needs: build_asan
strategy:
fail-fast: false
matrix:
testscript: ['serial_regression.py', 'serial_regression_AD.py']
steps:
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
- name: Download All artifacts
uses: actions/download-artifact@v4
- name: Uncompress and Move Binaries
run: |
BIN_FOLDER="$PWD/install/bin"
mkdir -p $BIN_FOLDER
ls -lah $BIN_FOLDER
for type in Base Reverse Forward; do
TYPE_FOLDER="${type}NoMPI-asan"
echo "Processing '$TYPE_FOLDER' ..."
if [ -d $TYPE_FOLDER ]; then
pushd $TYPE_FOLDER
ls -lah
tar -zxvf install_bin.tgz
ls -lah install/bin/
cp -r install/* $BIN_FOLDER/../
popd;
fi
done
chmod a+x $BIN_FOLDER/*
ls -lahR $BIN_FOLDER
- name: Run Tests in Container
uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--asan"
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
unit_tests:
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
name: Unit Tests
needs: build
strategy:
fail-fast: false
matrix:
testdriver: ['test_driver', 'test_driver_AD', 'test_driver_DD']
include:
- testdriver: 'test_driver'
tag: MPI
- testdriver: 'test_driver_AD'
tag: MPI
- testdriver: 'test_driver_DD'
tag: MPI
steps:
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
- name: Download Base
uses: actions/download-artifact@v4
with:
name: ${{format('Base{0}', matrix.tag)}}
path: ${{format('Base{0}', matrix.tag)}}
- name: Download Reverse
uses: actions/download-artifact@v4
with:
name: ${{format('Reverse{0}', matrix.tag)}}
path: ${{format('Reverse{0}', matrix.tag)}}
- name: Download Forward
uses: actions/download-artifact@v4
with:
name: ${{format('Forward{0}', matrix.tag)}}
path: ${{format('Forward{0}', matrix.tag)}}
- name: Uncompress and Move Binaries
run: |
ls -lah
BIN_FOLDER="$PWD/install/bin"
mkdir -p $BIN_FOLDER
ls -laH $BIN_FOLDER
for type in Base Reverse Forward; do
TYPE_FOLDER="${type}${{matrix.tag}}"
if [ -d $TYPE_FOLDER ]; then
echo "Processing '$TYPE_FOLDER' ..."
pushd $TYPE_FOLDER
ls -lah
tar -zxvf install_bin.tgz
ls -laH install/bin/
cp -r install/* $BIN_FOLDER/../
popd;
else
echo "$TYPE_FOLDER does not exist!"
fi
done
find $BIN_FOLDER -type f -exec chmod a+x '{}' \;
ls -lahR $BIN_FOLDER
echo "cloning branch"
branch="${{github.ref}}"
name="SU2"
SRC_FOLDER="$PWD/src"
mkdir -p $SRC_FOLDER
cd $SRC_FOLDER
git clone --recursive --depth=1 --shallow-submodules https://github.com/su2code/SU2 $name
cd $name
git config --add remote.origin.fetch '+refs/pull/*/merge:refs/remotes/origin/refs/pull/*/merge'
git config --add remote.origin.fetch '+refs/heads/*:refs/remotes/origin/refs/heads/*'
git fetch origin --depth=1 $branch:$branch
git checkout $branch
git submodule update
echo $PWD
ls -lahR
cd ..
echo "done cloning"
echo $PWD
ls -lahR
- name: Run Unit Tests
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
with:
entrypoint: install/bin/${{matrix.testdriver}}
- name: Post Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}