-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
234 lines (209 loc) · 6.12 KB
/
.gitlab-ci.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
image: "registry.gitlab.com/leia-methods/argo/openfoam-v2112_ubuntu-focal:2021-10-27-SMCIA-R1"
.prepare_openfoam_and_binaries:
before_script:
##
## Configure the OpenFOAM environment
##
- source /opt/OpenFOAM/OpenFOAM-v2112/etc/bashrc || true
##
## Re-use user-defined OF applications from the FOAM_USER_APPBIN artifact
##
- if [ ! -d "$FOAM_USER_APPBIN" ]; then mkdir -p "$FOAM_USER_APPBIN"; fi
- cp FOAM_USER_APPBIN/* $FOAM_USER_APPBIN
##
## Re-use user-defined OF libraries from the FOAM_USER_LIBBIN artifact
##
- if [ ! -d "$FOAM_USER_LIBBIN" ]; then mkdir -p "$FOAM_USER_LIBBIN"; fi
- cp FOAM_USER_LIBBIN/* $FOAM_USER_LIBBIN
stages:
- building
- smoke_tests
- reproduction
- visualization
#- testing // Not defined yet (TT)
build_debug:
stage: building
script:
##
## Configure the OpenFOAM environment
##
- source /opt/OpenFOAM/OpenFOAM-v2112/etc/bashrc || true
##
## Build and install
##
- ./install.sh Debug
build_release:
stage: building
needs: []
script:
##
## Configure the OpenFOAM environment
##
- source /opt/OpenFOAM/OpenFOAM-v2112/etc/bashrc || true
##
## Build and install
##
- ./install.sh
##
## OpenFOAM stores app and library binaries outside of project folder!
## To re-use project apps and libraries, use FOAM_USER_* env variables.
## Store the app and library binary files in a local folder and forward
## this folder to the next job using GitLab CI artifacts.
##
##
## Uncomment if the project builds user-defined OF libraries.
##
- mkdir FOAM_USER_LIBBIN && cp $FOAM_USER_LIBBIN/* FOAM_USER_LIBBIN
- mkdir FOAM_USER_APPBIN && cp $FOAM_USER_APPBIN/* FOAM_USER_APPBIN
artifacts:
paths:
##
## Uncomment if user-defind OF libraries are built.
##
- FOAM_USER_LIBBIN/*
##
## Export user-defined OF applications
##
- FOAM_USER_APPBIN/*
triSurface_initialization:
stage: smoke_tests
dependencies:
- build_release
extends: .prepare_openfoam_and_binaries
script:
- cd cases/initialization
- ./run_triSurface_smoke_tests.sh
artifacts:
paths:
- cases/initialization/triSurface-smoke-test-results/*
cpc_2021_data:
stage: reproduction
dependencies:
- build_release
only:
variables:
- $REPRODUCE_CPC2021 != null
extends: .prepare_openfoam_and_binaries
script:
- cd cases/initialization
- ./reproduce_CPC2021_results.sh
artifacts:
paths:
- cases/initialization/CPC2021-results/*
cpc_2021_regression:
stage: reproduction
needs:
- job: cpc_2021_data
artifacts: true
rules:
- if: $REPRODUCE_CPC2021 != null
script:
- wget https://zenodo.org/record/5603255/files/argo-2021-10-27-SMCIA-R1-data.zip?download=1 -O ref_data.zip
- unzip -d ref_data ref_data.zip
- git clone --depth=1 https://gitlab.com/dglaeser/fieldcompare
- cd fieldcompare && python -m pip install . && cd ..
- rm -rf fieldcompare
- |
fieldcompare dir \
cases/initialization/CPC2021-results \
ref_data/cases/initialization/CPC2021-results \
--include-files "*.csv" \
--exclude-fields "CPU_TIME*" \
--exclude-fields "VOLUME_FROM_SURFACE*" \
--exclude-fields "VOLUME_ERROR_FROM_SURFACE*" \
--relative-tolerance 1e-6
cpc_2021_visualize:
stage: visualization
dependencies:
- cpc_2021_data
only:
variables:
- $REPRODUCE_CPC2021 != null
script:
- cd cases/initialization
- ./visualize_CPC2021_results.sh
artifacts:
paths:
- cases/initialization/CPC2021-results/*
#density_ratio_param_study:
# stage: running
# dependencies:
# - build_release
# extends: .prepare_openfoam_and_binaries
# script:
#
# # Run the parameter variation tests
# - source cases/scripts/bashrc
# - cd cases/hydrodynamic/translatingDroplet3D
# - argo-create-parameter-study.py densityRatioInfluence.parameter -v "0,2,4,6"
# - argo-initilize-parameter-study.py densityRatioInfluence_0000 -m blockMesh -f initFields.sh
# - argo-run-study.py interIsoRhoFoam -d densityRatioInfluence_0000 -nc 4
# - jupyter-nbconvert --execute --to=html test-nb.ipynb
#
# artifacts:
# paths:
# - cases/hydrodynamic/translatingDroplet3D/test-nb.html
#convert_notebooks:
# stage: visualization
# dependencies:
# - param_study
# script:
#
# ##
# ## Configure the OpenFOAM environment
# ##
# - source /opt/OpenFOAM/OpenFOAM-v2112/etc/bashrc || true
#
# ##
# ## Process secondary data from applications in jupyter notebooks
# ## - Visualize errors
# ## - Compute convergence rates
# ## - Write the additional convergence data
# ##
# - cd cases &&
# jupyter nbconvert fvc-reconstruct-convergence.ipynb --execute --to markdown &&
# jupyter nbconvert fvc-reconstruct-convergence.ipynb --execute --to pdf
#
#
# artifacts:
# paths:
# ##
# ## Secondary data used by Jupyter notebooks
# ##
# - cases/hex2D/*.csv
#
# ##
# ## Secondary data processed by Jupyter notebooks
# ##
# - cases/fvc-reconstruct-data/*
#
# ##
# ## Jupyter Notebooks in different formats
# ##
# - cases/fvc-reconstruct-convergence.ipynb
# - cases/fvc-reconstruct-convergence_files
# - cases/fvc-reconstruct-convergence.md
# - cases/fvc-reconstruct-convergence.pdf
#
#test_shear2D:
# stage: testing
# dependencies:
# - convert_notebooks
# script:
#
# ##
# ## Test shear2D convergence
# ##
# - cd cases && python test_convergence.py fvc-reconstruct-data/SHEAR_2D.csv
#
#test_hadamard-rybczynsky2D:
# stage: testing
# dependencies:
# - convert_notebooks
# script:
#
# ##
# ## Test hadamard-rybczynsky2D convergence
# ##
# - cd cases && python test_convergence.py fvc-reconstruct-data/HADAMARD_RYBCZYNSKY_2D.csv
#