-
Notifications
You must be signed in to change notification settings - Fork 20
292 lines (238 loc) · 9.24 KB
/
test_libclouphxx.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
name: Test libcloudph++
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build_CUDA:
runs-on: ubuntu-20.04
strategy:
matrix:
name: ["CUDA"]
build_type: ["Debug", "RelWithDebInfoPortable"]
include:
- name: "CUDA"
disable_cuda: false
# not enough RAM to compile Debug CUDA on 4 threads
threads: 1
steps:
- uses: actions/checkout@v2
- name: build libcloudph++
uses: igfuw/libcloudphxx_build@v0.3
with:
disable_cuda: ${{matrix.disable_cuda}}
build_type: ${{matrix.build_type}}
threads: ${{matrix.threads}}
path: ${{ github.workspace }}
build:
runs-on: ubuntu-20.04
strategy:
matrix:
name: ["no_CUDA"]
build_type: ["Debug", "RelWithDebInfoPortable"]
mpi: ["none", "mvapich2"]
#mpi: ["none"]
include:
- name: "no_CUDA"
disable_cuda: true
threads: 4
- mpi: "none"
tag: "ubuntu_20_04_cuda_11_4"
cxx: "g++"
- mpi: "mvapich2"
tag: "ubuntu_20_04_cuda_11_4_mvapich2"
cxx: "mpic++"
steps:
- uses: actions/checkout@v2
- name: build libcloudph++
uses: igfuw/libcloudphxx_build@v0.3
with:
disable_cuda: ${{matrix.disable_cuda}}
build_type: ${{matrix.build_type}}
threads: ${{matrix.threads}}
path: ${{ github.workspace }}
install_prefix: ${{ github.workspace }}/installed
tag: ${{ matrix.tag }}
cxx: ${{ matrix.cxx }}
# tar build dir before upload as artifact to retain permission and case-sensitive names
- name: Compress libcloudph++ build
run: tar -cvf build.tar build
- name: Upload libcloudph++ build
uses: actions/upload-artifact@v2
with:
name: libcloud_build_${{matrix.build_type}}_mpi_${{matrix.mpi}}_tar
path: build.tar
# test jobs
unit_test:
needs: build
runs-on: ubuntu-20.04
strategy:
matrix:
build_type: ["RelWithDebInfoPortable", "Debug"]
mpi: ["none", "mvapich2"]
include:
- mpi: "none"
tag: "ubuntu_20_04_cuda_11_4"
- mpi: "mvapich2"
tag: "ubuntu_20_04_cuda_11_4_mvapich2"
steps:
- uses: actions/checkout@v2
- name: Download libcloudph++ build
uses: actions/download-artifact@v2
with:
name: libcloud_build_${{matrix.build_type}}_mpi_${{matrix.mpi}}_tar
- name: Decompress libcloudph++ build
run: tar -xvf build.tar
- name: load UWLCM Singularity image
uses: igfuw/load_UWLCM_singularity_image@v0.1b
with:
path: ${{ github.workspace }}/singularity_images
tag: ${{ matrix.tag }}
- name: Run unit tests
working-directory: ${{github.workspace}}/build
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: OMP_NUM_THREADS=4 singularity exec $SI ctest -C ${{matrix.build_type}} || cat Testing/Temporary/LastTest.log / # "/" intentional! (just to make cat exit with an error code)
kinematic_2D_test:
needs: build
runs-on: ubuntu-20.04
strategy:
matrix:
build_type: ["RelWithDebInfoPortable"]
mpi: ["none"]
steps:
- uses: actions/checkout@v2
- name: Download libcloudph++ build
uses: actions/download-artifact@v2
with:
name: libcloud_build_${{matrix.build_type}}_mpi_${{matrix.mpi}}_tar
- name: Decompress libcloudph++ build
run: tar -xvf build.tar
# Debugging with a ssh session
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Install libcloudph++
run: sudo cmake --install build
- name: checkout libmpdata++ repo
uses: actions/checkout@v2
with:
repository: igfuw/libmpdataxx
path: libmpdataxx
- name: Install libmpdata++
uses: igfuw/libmpdataxx_install@v0.5
with:
build_type: ${{matrix.build_type}}
threads: 4
path: ${{ github.workspace }}/libmpdataxx/libmpdata++
install_prefix: ${{ github.workspace }}/installed
- name: Configure kinematic_2D CMake
working-directory: ${{github.workspace}}/models/kinematic_2D
run: singularity exec -B ${{ github.workspace }}/installed/ $SI cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -Dlibcloudph++_DIR=${{ github.workspace }}/installed/share/libcloudph++ -Dlibmpdata++_DIR=${{ github.workspace }}/installed/share/libmpdata++
- name: Build kinematic_2D
working-directory: ${{github.workspace}}/models/kinematic_2D
run: VERBOSE=1 singularity exec -B ${{ github.workspace }}/installed/ $SI cmake --build build --config ${{matrix.build_type}}
- name: Run kinematic_2D tests
working-directory: ${{github.workspace}}/models/kinematic_2D/build
run: |
singularity exec -B ${{ github.workspace }}/installed/ $SI ctest -VV -R travis # compare icicle results against reference data (done for full simulation for bulk schemes and a couple of steps for lagrangian)
cat Testing/Temporary/LastTest.log
# Debugging with a ssh session on failure
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
parcel_test:
needs: build
# do after kinematic_2D_test, because otherwise we occasionally get "illegal instruction" errors, probably because libcloudphxx is installed simultaneously on the same runner at the same location by two different jobs (?)
# needs: kinematic_2D_test
runs-on: ubuntu-20.04
strategy:
matrix:
build_type: ["RelWithDebInfoPortable", "Debug"]
mpi: ["none"]
include:
- build_type: "RelWithDebInfoPortable"
long_tests: true
debug_tests: false
- build_type: "Debug"
long_tests: false
debug_tests: true
steps:
- uses: actions/checkout@v2
- name: Download libcloudph++ build
uses: actions/download-artifact@v2
with:
name: libcloud_build_${{matrix.build_type}}_mpi_${{matrix.mpi}}_tar
- name: Decompress libcloudph++ build
run: tar -xvf build.tar
- name: load UWLCM Singularity image
uses: igfuw/load_UWLCM_singularity_image@v0.1b
with:
path: ${{ github.workspace }}/singularity_images
- name: Install libcloudph++
run: sudo cmake --install build
- name: checkout parcel repo
uses: actions/checkout@v2
with:
repository: igfuw/parcel
path: parcel
- run: mkdir parcel/plots/outputs
- name: run parcel unit_test
working-directory: ${{github.workspace}}/parcel
if: ${{matrix.long_tests}}
run: PYTHONPATH=${{ github.workspace }}/installed/usr/lib/python3/dist-packages singularity exec -B${{ github.workspace }}/installed $SI python3 -m pytest -s -v unit_test
#run: PYTHONPATH=${{ github.workspace }}/installed/usr/lib/python3/dist-packages singularity exec -B${{ github.workspace }}/installed,/usr/lib/python3/dist-packages/Gnuplot $SI python3 -m pytest -v unit_test
- name: run parcel long_test
working-directory: ${{github.workspace}}/parcel
if: ${{matrix.long_tests}}
run: PYTHONPATH=${{ github.workspace }}/installed/usr/lib/python3/dist-packages singularity exec -B${{ github.workspace }}/installed $SI python3 -m pytest -s -v long_test
- name: run parcel unit_test_debug
working-directory: ${{github.workspace}}/parcel
if: ${{matrix.debug_tests}}
run: PYTHONPATH=${{ github.workspace }}/installed/usr/lib/python3/dist-packages singularity exec -B${{ github.workspace }}/installed $SI python3 -m pytest -s -v unit_test_debug
build_and_test_KiD-A:
runs-on: ubuntu-20.04
strategy:
matrix:
name: ["no_CUDA"]
build_type: ["RelWithDebInfoPortable"]
mpi: ["none"]
include:
- name: "no_CUDA"
disable_cuda: true
threads: 4
steps:
- name: Checkout libcloudphxx PR
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: merge with the KiD-A branch
run: |
git config --global user.email "pdziekan@fuw.edu.pl"
git config --global user.name "Piotr Dziekan"
git fetch origin
git merge origin/kida-1d
- run: grep diag_accr include/libcloudph++/lgrngn/particles.hpp
- name: build libcloudph++
uses: igfuw/libcloudphxx_build@v0.3
with:
disable_cuda: ${{matrix.disable_cuda}}
build_type: ${{matrix.build_type}}
threads: ${{matrix.threads}}
path: ${{ github.workspace }}
install_prefix: ${{ github.workspace }}/installed
- name: Install libcloudph++
run: sudo cmake --install build
- name: checkout KiD-libcloud repo
uses: actions/checkout@v2
with:
repository: igfuw/kid-libcloud
path: kid-libcloud
- name: run KiD LWP test
working-directory: ${{github.workspace}}/kid-libcloud
run: PYTHONPATH=${{ github.workspace }}/installed/usr/lib/python3/dist-packages singularity exec -B${{ github.workspace }}/installed $SI bash ./.travis_scripts/lwp_test.sh
call_test_uwlcm_hlpr:
uses: igfuw/UWLCM/.github/workflows/test_uwlcm_hlpr.yml@master
with:
UWLCM_sha: "master"
libcloudphxx_sha: ${{ github.sha }} # merge PR SHA
libmpdataxx_sha: "master"