-
Notifications
You must be signed in to change notification settings - Fork 21
/
.gitlab-ci.yml
368 lines (312 loc) · 14.5 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
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
---
# =================================================================================================================================
# Stages to be executed, each stage is a collection of jobs pointing to the stage
# =================================================================================================================================
stages:
- startup
- build
- runs
- cleanup
# =================================================================================================================================
# GLOBALS
# =================================================================================================================================
variables:
GIT_STRATEGY: none
GLOBAL_CACHE_PATH: "/home/gitlab-runner/globalcache/${CI_PIPELINE_ID}_${CI_COMMIT_REF_NAME}"
# =================================================================================================================================
# SHORT SYNTAX EXPLANATIONS FOR THE JOB, FOR DETAILS VISIT: ===> https://docs.gitlab.com/ce/ci/yaml/ <===
# "stage:" makes the job part of a stage defined above
# "tags:" selects the runner
# "only:" restricts the execution of the job to a git branch or tag
# "before_script:" shell commands to be executed before the main script.
# "script:" shell commands for the test. If a shell command exits with >0, the job is marked as "failed", else as "passed".
# commands after a failing one are not executed anymore!
# "after_script:" shell commands after passed OR failed script. Careful, the current directory is always the root of the repo!
# "artifacts:" keep data from the job which is uploaded to gitlab.com. You really should set a duration to expiration.
# "when:" can be either on_failure, on_success or always
# =================================================================================================================================
# =================================================================================================================================
# TEMPLATE DEFINITIONS
# =================================================================================================================================
# NOTE: _ipp is the runner testimony_fluxo , with tag: IPP_vm_linux_fluxo
# _pcm is the runner [email protected] with tag: PCM_linux_fluxo
.job_IPP_setup_intel: &IPP_setup_intel
variables:
RUNNERNAME: IPP
CURR_CMP: intel
tags:
- ipp_vm_linux_fluxo
before_script:
- . ~/environments/modules_for_fluxo_intel ; pwd
- export MPIRUNCOMMAND="mpirun -np"
- export NIGHTLYBUILDMODE="Release"
.job_IPP_setup_intel_build: &IPP_setup_intel_build
variables:
RUNNERNAME: IPP
CURR_CMP: intel
GIT_STRATEGY: clone
tags:
- ipp_vm_linux_fluxo
before_script:
- . ~/environments/modules_for_fluxo_intel ; pwd
- export MPIRUNCOMMAND="mpirun -np"
- export NIGHTLYBUILDMODE="Release"
.job_PCM_setup_gnu: &PCM_setup_gnu
variables:
RUNNERNAME: PCM
CURR_CMP: gnu
tags:
- pcm_linux_fluxo
before_script:
- export MPIRUNCOMMAND="mpirun -np"
- export NIGHTLYBUILDMODE="Debug"
- pwd
.job_PCM_setup_gnu_build: &PCM_setup_gnu_build
variables:
RUNNERNAME: PCM
CURR_CMP: gnu
GIT_STRATEGY: clone
tags:
- pcm_linux_fluxo
before_script:
- export MPIRUNCOMMAND="mpirun -np"
- export NIGHTLYBUILDMODE="Debug"
- pwd
# =================================================================================================================================
# TEMPLATES FOR STAGE "startup"
# =================================================================================================================================
.job_script_startup: &script_startup
stage: startup
script:
- echo ${RUNNERNAME} "RUNNER WARM-UP"
- echo "create" ${GLOBAL_CACHE_PATH}_${CURR_CMP}
- mkdir -p ${GLOBAL_CACHE_PATH}_${CURR_CMP}
# =================================================================================================================================
# TEMPLATES FOR STAGE "build"
# =================================================================================================================================
.job_common_arts:
artifacts: &common_arts
name: "${CI_PIPELINE_ID}_${CI_COMMIT_REF_NAME}_${CI_JOB_NAME}"
expire_in: 2 days
when: on_failure
# -------------------------------------------------------------------------------------------------------------------------------
.job_script_build_linadv: &script_build_linadv
stage: build
script:
- cd tests; pwd
- rm -rf dirx_1* log_1*.txt
- if [ -n "${NIGHTLY_RUNNER}" ]; then python3 build_tests.py -p 10 -stage 0 -buildhdf5 0 -build ${NIGHTLYBUILDMODE} -case 100-199
- else python3 build_tests.py -p 10 -stage 0 -buildhdf5 0 -build Release -case 101,102 ; fi
- mv dirx_1* ${GLOBAL_CACHE_PATH}_${CURR_CMP}/.
artifacts:
<<: *common_arts
paths:
- tests/log_1*.txt
# -------------------------------------------------------------------------------------------------------------------------------
.job_script_build_maxwell: &script_build_maxwell
stage: build
script:
- cd tests; pwd
- rm -rf dirx_2* log_2*
- if [ -n "${NIGHTLY_RUNNER}" ]; then python3 build_tests.py -p 10 -stage 0 -buildhdf5 0 -build ${NIGHTLYBUILDMODE} -case 200-299
- else python3 build_tests.py -p 10 -stage 0 -buildhdf5 0 -build Release -case 201,202 ; fi
- mv dirx_2* ${GLOBAL_CACHE_PATH}_${CURR_CMP}/.
artifacts:
<<: *common_arts
paths:
- tests/log_2*.txt
# -------------------------------------------------------------------------------------------------------------------------------
.job_script_build_mhd: &script_build_mhd
stage: build
script:
- cd tests; pwd
- rm -rf dirx_3* log_3*
- if [ -n "${NIGHTLY_RUNNER}" ]; then python3 build_tests.py -p 10 -stage 0 -buildhdf5 0 -build ${NIGHTLYBUILDMODE} -case 300-399
- else python3 build_tests.py -p 10 -stage 0 -buildhdf5 0 -build Release -case 301,302,316 ; fi
- mv dirx_3* ${GLOBAL_CACHE_PATH}_${CURR_CMP}/.
artifacts:
<<: *common_arts
paths:
- tests/log_3*.txt
# -------------------------------------------------------------------------------------------------------------------------------
.job_script_build_nav-st: &script_build_nav-st
stage: build
script:
- cd tests; pwd
- rm -rf dirx_4* log_4*
- if [ -n "${NIGHTLY_RUNNER}" ]; then python3 build_tests.py -p 10 -stage 0 -buildhdf5 0 -build ${NIGHTLYBUILDMODE} -case 400-499
- else python3 build_tests.py -p 10 -stage 0 -buildhdf5 0 -build Release -case 401,402,413,414,416 ; fi
- mv dirx_4* ${GLOBAL_CACHE_PATH}_${CURR_CMP}/.
artifacts:
<<: *common_arts
paths:
- tests/log_4*.txt
# =================================================================================================================================
# TEMPLATES FOR STAGE "runs"
# =================================================================================================================================
# -------------------------------------------------------------------------------------------------------------------------------
.job_script_runs_linadv: &script_runs_linadv
stage: runs
script:
- cd tests; pwd
- rm -f runs/linadv/*/*/log_1*.txt
- rm -rf dirx_1* ; mv ${GLOBAL_CACHE_PATH}_${CURR_CMP}/dirx_1* .
- if [ -n "${NIGHTLY_RUNNER}" ]; then python3 build_tests.py -p 10 -stage 2 -build ${NIGHTLYBUILDMODE} -case 100-199
- else python3 build_tests.py -p 10 -stage 2 -build Release -case 101,102 ; fi
artifacts:
<<: *common_arts
paths:
- tests/runs/linadv/*/*/log_1*.txt
# -------------------------------------------------------------------------------------------------------------------------------
.job_script_runs_maxwell: &script_runs_maxwell
stage: runs
script:
- cd tests; pwd
- rm -f runs/maxwell/*/*/log_2*.txt
- rm -rf dirx_2*; mv ${GLOBAL_CACHE_PATH}_${CURR_CMP}/dirx_2* .
- if [ -n "${NIGHTLY_RUNNER}" ]; then python3 build_tests.py -p 10 -stage 2 -build ${NIGHTLYBUILDMODE} -case 200-299
- else python3 build_tests.py -p 10 -stage 2 -build Release -case 201,202 ; fi
artifacts:
<<: *common_arts
paths:
- tests/runs/maxwell/*/*/log_2*.txt
# -------------------------------------------------------------------------------------------------------------------------------
.job_script_runs_mhd: &script_runs_mhd
stage: runs
script:
- cd tests; pwd
- rm -f runs/mhd/*/*/log_3*.txt
- rm -rf dirx_3*; mv ${GLOBAL_CACHE_PATH}_${CURR_CMP}/dirx_3* .
- if [ -n "${NIGHTLY_RUNNER}" ]; then python3 build_tests.py -p 10 -stage 2 -build ${NIGHTLYBUILDMODE} -case 300-399
- else python3 build_tests.py -p 10 -stage 2 -build Release -case 301,302,316 ; fi
artifacts:
<<: *common_arts
paths:
- tests/runs/mhd/*/*/log_3*.txt
# -------------------------------------------------------------------------------------------------------------------------------
.job_script_runs_nav-st: &script_runs_nav-st
stage: runs
script:
- cd tests; pwd
- rm -f runs/navst/*/*/log_4*.txt
- rm -rf dirx_4* ; mv ${GLOBAL_CACHE_PATH}_${CURR_CMP}/dirx_4* .
- if [ -n "${NIGHTLY_RUNNER}" ]; then python3 build_tests.py -p 10 -stage 2 -build ${NIGHTLYBUILDMODE} -case 400-499
- else python3 build_tests.py -p 10 -stage 2 -build Release -case 401,402,413,414,416 ; fi
artifacts:
<<: *common_arts
paths:
- tests/runs/navst/*/*/log_4*.txt
# =================================================================================================================================
# TEMPLATES FOR STAGE "cleanup"
# =================================================================================================================================
.job_script_cleanup: &script_cleanup
stage: cleanup
when: always
script:
- pwd
- echo "on" ${RUNNERNAME} "RUNNER"
- echo "remove:" ${GLOBAL_CACHE_PATH}_${CURR_CMP}
- rm -rf ${GLOBAL_CACHE_PATH}_${CURR_CMP}
# #################################################################################################################################
# JOB DEFINITIONS
# HERE, the "needs:" command is used to generate a dependency for each job.
# - the startup job does nothing except checking if the gitlab runner is listening.
# - this way, all the remainingjobs can be executed only in their dependency order,
# and thus before the whole stage is ready (even jump over stages)
# #################################################################################################################################
# =================================================================================================================================
# Stage "startup"
# =================================================================================================================================
IPP_intel_startup:
<<: *IPP_setup_intel
<<: *script_startup
PCM_gnu_startup:
<<: *PCM_setup_gnu
<<: *script_startup
# =================================================================================================================================
# Stage "build"
# =================================================================================================================================
IPP_intel_mhd_build:
needs: ["IPP_intel_startup"]
<<: *IPP_setup_intel_build
<<: *script_build_mhd
PCM_gnu_mhd_build:
needs: ["PCM_gnu_startup"]
<<: *PCM_setup_gnu_build
<<: *script_build_mhd
# -------------------------------------------------------------------------------------------------------------------------------
IPP_intel_linadv_build:
needs: ["IPP_intel_startup"]
<<: *IPP_setup_intel_build
<<: *script_build_linadv
PCM_gnu_linadv_build:
needs: ["PCM_gnu_startup"]
<<: *PCM_setup_gnu_build
<<: *script_build_linadv
# -------------------------------------------------------------------------------------------------------------------------------
IPP_intel_maxwell_build:
needs: ["IPP_intel_startup"]
<<: *IPP_setup_intel_build
<<: *script_build_maxwell
PCM_gnu_maxwell_build:
needs: ["PCM_gnu_startup"]
<<: *PCM_setup_gnu_build
<<: *script_build_maxwell
# -------------------------------------------------------------------------------------------------------------------------------
IPP_intel_nav-st_build:
needs: ["IPP_intel_startup"]
<<: *IPP_setup_intel_build
<<: *script_build_nav-st
PCM_gnu_nav-st_build:
needs: ["PCM_gnu_startup"]
<<: *PCM_setup_gnu_build
<<: *script_build_nav-st
# =================================================================================================================================
# Stage "runs"
# =================================================================================================================================
IPP_intel_mhd_runs:
needs: ["IPP_intel_mhd_build"]
<<: *IPP_setup_intel
<<: *script_runs_mhd
PCM_gnu_mhd_runs:
needs: ["PCM_gnu_mhd_build"]
<<: *PCM_setup_gnu
<<: *script_runs_mhd
# -------------------------------------------------------------------------------------------------------------------------------
IPP_intel_linadv_runs:
needs: ["IPP_intel_linadv_build"]
<<: *IPP_setup_intel
<<: *script_runs_linadv
PCM_gnu_linadv_runs:
needs: ["PCM_gnu_linadv_build"]
<<: *PCM_setup_gnu
<<: *script_runs_linadv
# -------------------------------------------------------------------------------------------------------------------------------
IPP_intel_maxwell_runs:
needs: ["IPP_intel_maxwell_build"]
<<: *IPP_setup_intel
<<: *script_runs_maxwell
PCM_gnu_maxwell_runs:
needs: ["PCM_gnu_maxwell_build"]
<<: *PCM_setup_gnu
<<: *script_runs_maxwell
# -------------------------------------------------------------------------------------------------------------------------------
IPP_intel_nav-st_runs:
needs: ["IPP_intel_nav-st_build"]
<<: *IPP_setup_intel
<<: *script_runs_nav-st
PCM_gnu_nav-st_runs:
needs: ["PCM_gnu_nav-st_build"]
<<: *PCM_setup_gnu
<<: *script_runs_nav-st
# =================================================================================================================================
# Stage "cleanup"
# =================================================================================================================================
IPP_intel_cleanup_cache:
needs: ["IPP_intel_linadv_runs", "IPP_intel_maxwell_runs", "IPP_intel_mhd_runs", "IPP_intel_nav-st_runs"]
<<: *IPP_setup_intel
<<: *script_cleanup
PCM_gnu_cleanup_cache:
needs: ["PCM_gnu_linadv_runs", "PCM_gnu_maxwell_runs", "PCM_gnu_mhd_runs", "PCM_gnu_nav-st_runs"]
<<: *PCM_setup_gnu
<<: *script_cleanup