forked from su2code/SU2
-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (132 loc) · 5.28 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
name: Regression and Unit Testing
on:
push:
branches:
- 'develop'
- 'master'
pull_request:
branches:
- 'develop'
- 'master'
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-tests=true --warnlevel=3 --werror'
- 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 -Dwith-mpi=disabled -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-tecio=false --warnlevel=3 --werror'
- config_set: ReverseOMP
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3 --werror'
- config_set: ForwardOMP
flags: '-Denable-directdiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3 --werror'
runs-on: ubuntu-latest
steps:
- name: Cache Object Files
uses: actions/cache@v1
with:
path: ccache
key: ${{ matrix.config_set }}-${{ github.sha }}
restore-keys: ${{ matrix.config_set }}
- name: Build
uses: docker://su2code/build-su2:20191105
with:
args: -b ${{github.ref}} -f "${{matrix.flags}}"
- name: Upload Binaries
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.config_set }}
path: install/bin
regression_tests:
runs-on: 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: Download All artifact
uses: actions/download-artifact@v2
- name: Move Binaries
run: |
mkdir -p install/bin
if [ -d "${{format('Base{0}', matrix.tag)}}" ]; then cp -r ${{format('Base{0}', matrix.tag)}}/. install/bin/; fi
if [ -d "${{format('Reverse{0}', matrix.tag)}}" ]; then cp -r ${{format('Reverse{0}', matrix.tag)}}/. install/bin/; fi
if [ -d "${{format('Forward{0}', matrix.tag)}}" ]; then cp -r ${{format('Forward{0}', matrix.tag)}}/. install/bin/; fi
chmod a+x install/bin/*
- name: Run Tests in Container
uses: docker://su2code/test-su2:20200303
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
unit_tests:
runs-on: 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: Download Base
uses: actions/download-artifact@v1
with:
name: ${{format('Base{0}', matrix.tag)}}
- name: Download Reverse
uses: actions/download-artifact@v1
with:
name: ${{format('Reverse{0}', matrix.tag)}}
- name: Download Forward
uses: actions/download-artifact@v1
with:
name: ${{format('Forward{0}', matrix.tag)}}
- name: Move Binaries
run: |
mkdir -p install/bin
cp -r ${{format('Base{0}', matrix.tag)}}/. install/bin/
cp -r ${{format('Reverse{0}', matrix.tag)}}/. install/bin/
cp -r ${{format('Forward{0}', matrix.tag)}}/. install/bin/
chmod a+x install/bin/*
- name: Run Unit Tests
uses: docker://su2code/test-su2:20191031
with:
entrypoint: install/bin/${{matrix.testdriver}}