-
Notifications
You must be signed in to change notification settings - Fork 12
192 lines (175 loc) · 5.24 KB
/
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
# Run these tests automatically on Github
# on every push and pull request.
name: StellaTests
on: [push, pull_request]
# We run the in a bash shell
defaults:
run:
shell: bash
# Define the tests, for now we only have <standard_tests>
# where we define 3 seperate workflows in matrix/config/name
# For each of these workflows we need to perform the same
# initial steps: <Install dependencies>, <System information>
# Next, only the step corresponding to the test will be executed.
jobs:
# Build stella with Make in debug mode, here the python tests do not work!
# Specifically, the flush statement in mini_libstell's
# read_wout_mod.F module in the readw_and_open() routine breaks
# when reading a VMEC equilibirium during the python tests.
test1:
runs-on: ubuntu-latest
env:
OMPI_MCA_rmaps_base_oversubscribe: yes
MPIRUN: mpiexec -np
strategy:
fail-fast: false
matrix:
config:
- name: "Make stella in debug mode"
steps:
- name: Install dependencies
run: sudo apt update &&
sudo apt install -y
gfortran
make
libfftw3-dev
libnetcdf-dev
libnetcdff-dev
netcdf-bin
python3
python3-pip
openmpi-bin
libopenmpi-dev
- name: System information
run: |
cat /etc/*release
gfortran --version
nf-config --all
- uses: actions/checkout@v2
- name: Build stella in debug mode
run: |
set -ex
export GK_SYSTEM=gnu_ubuntu_debug
make -I Makefiles -j4
# Build stella with Make and run automatic fortran tests
test2:
runs-on: ubuntu-latest
env:
OMPI_MCA_rmaps_base_oversubscribe: yes
MPIRUN: mpiexec -np
strategy:
fail-fast: false
matrix:
config:
- name: "Perform fortran tests of the stella code"
steps:
- name: Install dependencies
run: sudo apt update &&
sudo apt install -y
gfortran
make
libfftw3-dev
libnetcdf-dev
libnetcdff-dev
netcdf-bin
python3
python3-pip
openmpi-bin
libopenmpi-dev
- name: System information
run: |
cat /etc/*release
gfortran --version
nf-config --all
- uses: actions/checkout@v2
- name: Build stella
run: |
set -ex
export GK_SYSTEM=gnu_ubuntu
make -I Makefiles -j4
- name: Perform automated Fortran tests
run: |
set -ex
export GK_SYSTEM=gnu_ubuntu
make -I Makefiles -j4 build-pfunit-library
make -I Makefiles -j4 run-automated-fortran-tests
# Build stella with Make and run automatic python tests
test3:
runs-on: ubuntu-latest
env:
OMPI_MCA_rmaps_base_oversubscribe: yes
MPIRUN: mpiexec -np
strategy:
fail-fast: false
matrix:
config:
- name: "Run stella and check the outputs numerically"
steps:
- name: Install dependencies
run: sudo apt update &&
sudo apt install -y
gfortran
make
libfftw3-dev
libnetcdf-dev
libnetcdff-dev
netcdf-bin
python3
python3-pip
openmpi-bin
libopenmpi-dev
- name: System information
run: |
cat /etc/*release
gfortran --version
nf-config --all
- uses: actions/checkout@v2
- name: Install automated stella test dependencies
run: pip3 install --user -r tests/requirements.txt
- name: Build stella
run: |
set -ex
export GK_SYSTEM=gnu_ubuntu
make -I Makefiles -j4
- name: Perform numerical tests for stella with Python
run: |
set -ex
export GK_SYSTEM=gnu_ubuntu
make -I Makefiles run-automated-numerical-tests-for-stella
# Build stella with CMake and run automatic Fortran tests
# Cmake has to run on 1 node or it will run into parallelisation errors
test4:
runs-on: ubuntu-latest
env:
OMPI_MCA_rmaps_base_oversubscribe: yes
MPIRUN: mpiexec -np
strategy:
fail-fast: false
matrix:
config:
- name: "CMake stella"
steps:
- name: Install dependencies
run: sudo apt update &&
sudo apt install -y
gfortran
make
libfftw3-dev
libnetcdf-dev
libnetcdff-dev
netcdf-bin
python3
python3-pip
openmpi-bin
libopenmpi-dev
- name: System information
run: |
cat /etc/*release
gfortran --version
nf-config --all
- uses: actions/checkout@v2
- name: Build stella (CMake)
run: |
set -ex
cmake . -B build -DSTELLA_ENABLE_TESTS=on
cmake --build build -j1 --target check