-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
287 lines (278 loc) · 10.2 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
# Declare stages
stages:
- init
- build
- test
- deploy
# Default variables and parameters
variables:
# CI_BUILDS_DIR: $WORKDIR/.jacamar-ci/builds
CUSTOM_CI_BUILDS_DIR: $WORKDIR/test # inactif car option non activee dans la configuration du runner
GIT_STRATEGY: none # don't do anything by default
# SCHEDULER_PARAMETERS: "--qos=co_inter_bigmem --ntasks=40 --time=01:00:00 --exclusive" # spiro
# SCHEDULER_PARAMETERS: "--ntasks=1 --nodes=1-1 --time=00:30:00" # juno
# CI_DEBUG_TRACE: "true" #Uncomment to debug CI
default:
tags: #All jobs uses jamacar-slurm executor
- juno-shell
id_tokens:
CI_JOB_JWT:
aud: https://gitlab.onera.net
init_repo:
variables:
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: none
SCHEDULER_PARAMETERS: "--qos=co_inter_bigmem --cpus-per-task=24 --ntasks=1 --time=01:00:00"
#SCHEDULER_PARAMETERS: "-M rhel8 --qos=el8_gbe --ntasks=1 --time=00:10:00"
stage: init
script: # explicitly load modules one by one, so that if one fails, it will be easy to identify
# - echo "CI_PROJECT_DIR: $CI_PROJECT_DIR"
- echo "Clone directory $PWD"
- echo "CUSTOM_CI_DIR=$PWD" >> build.env
- git submodule update --init extensions/paradigma
artifacts:
reports:
dotenv: build.env
build:
parallel:
matrix:
- COMPILER: "gcc@12"
GNUM64:
- "ON"
MPI_LIB:
- "intel-oneapi"
PDMA:
- "ON"
BUILD_TYPE:
- "Sanitize"
- COMPILER: "gcc@12"
GNUM64:
- "ON"
MPI_LIB:
- "intel-oneapi"
PDMA:
- "OFF"
BUILD_TYPE:
- "Sanitize"
- COMPILER: "gcc@12"
GNUM64:
- "ON"
MPI_LIB:
- "intel-oneapi"
PDMA:
- "ON"
BUILD_TYPE:
- "Coverage"
- COMPILER: "gcc@12"
GNUM64:
- "ON"
MPI_LIB:
- "openmpi"
PDMA:
- "ON"
BUILD_TYPE:
- "Debug"
- COMPILER: "gcc@12"
GNUM64:
- "OFF"
MPI_LIB:
- "intel-oneapi"
PDMA:
- "ON"
BUILD_TYPE:
- "Sanitize"
- COMPILER: "intel-llvm@2022"
GNUM64:
- "OFF"
MPI_LIB:
- "intel-oneapi"
PDMA:
- "ON"
BUILD_TYPE:
- "Release"
- COMPILER: "intel@2022"
GNUM64:
- "ON"
MPI_LIB:
- "intel-oneapi"
PDMA:
- "ON"
BUILD_TYPE:
- "Debug"
variables:
MATRIX_KEY: _${COMPILER}_${MPI_LIB}_GNUM64_${GNUM64}_BUILD_${BUILD_TYPE}_PDMA_${PDMA}
stage: build
before_script:
- module purge
- echo "compilo = $COMPILER"
# - source /tmp_user/juno/sonics/dist/source_juno_all.sh --compiler $COMPILER --mpi $MPI_LIB && module load py-gcovr-4.2-gcc-8.3.1-6lqfk6f py-breathe-4.21.0-gcc-8.3.1-t576gc7 doxygen-1.9.3-gcc-8.3.1-4qcntlg texlive/2021 && python3 -m pip install sphinx-fortran sphinxcontrib-tikz jupytext
- source /tmp_user/juno/sonics/dist/source_juno_all.sh --compiler=$COMPILER --mpi=$MPI_LIB
script:
- echo "Runner directory is $PWD; move to working directory $CUSTOM_CI_DIR"
- cd $CUSTOM_CI_DIR
- mkdir -p build$MATRIX_KEY && cd build$MATRIX_KEY
- echo ${COMPILER}
- echo ${MPI_LIB}
- if [[ "${COMPILER}" == "gcc@12" && "${MPI_LIB}" == "intel-oneapi" ]]; then
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DPDM_ENABLE_Fortran_MPI_MODULE=OFF -DPDM_ENABLE_PYTHON_BINDINGS=ON -DPDM_ENABLE_STATIC=OFF -DPDM_ENABLE_SHARED=ON -DPDM_ENABLE_Fortran=ON -DPDM_ENABLE_EXTENSION_PDMA=${PDMA} -DPDM_ENABLE_LONG_G_NUM=${GNUM64} -DPDM_ENABLE_UNIT_TEST=ON ../
- elif [[ "${COMPILER}" == "gcc@12" && "${MPI_LIB}" == "openmpi" ]]; then
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DPDM_ENABLE_Fortran_MPI_MODULE=OFF -DPDM_ENABLE_PYTHON_BINDINGS=OFF -DPDM_ENABLE_STATIC=OFF -DPDM_ENABLE_SHARED=ON -DPDM_ENABLE_Fortran=OFF -DPDM_ENABLE_EXTENSION_PDMA=${PDMA} -DPDM_ENABLE_LONG_G_NUM=${GNUM64} -DPDM_ENABLE_UNIT_TEST=ON -DPDM_ENABLE_OPENMP=OFF -DMPIEXEC_EXECUTABLE=/opt/tools/openmpi/4.1.1-gnu831-hpc-cuda112/bin/mpirun ../
- elif [ "${COMPILER}" == "intel@2022" ]; then
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DPDM_ENABLE_PYTHON_BINDINGS=ON -DPDM_ENABLE_STATIC=OFF -DPDM_ENABLE_SHARED=ON -DPDM_ENABLE_Fortran=ON -DPDM_ENABLE_EXTENSION_PDMA=${PDMA} -DPDM_ENABLE_LONG_G_NUM=${GNUM64} -DPDM_ENABLE_DOC=ON -DPDM_ENABLE_UNIT_TEST=ON ../
- elif [ "${COMPILER}" == "intel-llvm@2022" ]; then
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DPDM_ENABLE_PYTHON_BINDINGS=OFF -DPDM_ENABLE_STATIC=OFF -DPDM_ENABLE_SHARED=ON -DPDM_ENABLE_Fortran=ON -DPDM_ENABLE_EXTENSION_PDMA=${PDMA} -DPDM_ENABLE_LONG_G_NUM=${GNUM64} -DPDM_ENABLE_UNIT_TEST=ON ../
- else
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DPDM_ENABLE_PYTHON_BINDINGS=ON -DPDM_ENABLE_STATIC=OFF -DPDM_ENABLE_SHARED=ON -DPDM_ENABLE_Fortran=ON -DPDM_ENABLE_EXTENSION_PDMA=${PDMA} -DPDM_ENABLE_LONG_G_NUM=${GNUM64} -DPDM_ENABLE_UNIT_TEST=ON ../
- fi
- make -j
unit_test:
parallel:
matrix:
- COMPILER: "gcc@12"
GNUM64:
- "ON"
MPI_LIB:
- "intel-oneapi"
PDMA:
- "ON"
BUILD_TYPE:
- "Sanitize"
- COMPILER: "gcc@12"
GNUM64:
- "ON"
MPI_LIB:
- "intel-oneapi"
PDMA:
- "OFF"
BUILD_TYPE:
- "Sanitize"
- COMPILER: "gcc@12"
GNUM64:
- "ON"
MPI_LIB:
- "intel-oneapi"
PDMA:
- "ON"
BUILD_TYPE:
- "Coverage"
- COMPILER: "gcc@12"
GNUM64:
- "ON"
MPI_LIB:
- "openmpi"
PDMA:
- "ON"
BUILD_TYPE:
- "Debug"
- COMPILER: "gcc@12"
GNUM64:
- "OFF"
MPI_LIB:
- "intel-oneapi"
PDMA:
- "ON"
BUILD_TYPE:
- "Sanitize"
- COMPILER: "intel-llvm@2022"
GNUM64:
- "OFF"
MPI_LIB:
- "intel-oneapi"
PDMA:
- "ON"
BUILD_TYPE:
- "Release"
- COMPILER: "intel@2022"
GNUM64:
- "ON"
MPI_LIB:
- "intel-oneapi"
PDMA:
- "ON"
BUILD_TYPE:
- "Debug"
variables:
MATRIX_KEY: _${COMPILER}_${MPI_LIB}_GNUM64_${GNUM64}_BUILD_${BUILD_TYPE}_PDMA_${PDMA}
SCHEDULER_PARAMETERS: "--qos=co_inter_bigmem --ntasks=40 --time=01:00:00 --exclusive"
stage: test
before_script:
- module purge
# - source /tmp_user/juno/sonics/dist/source_juno_all.sh --compiler $COMPILER --mpi $MPI_LIB && module load py-gcovr-4.2-gcc-8.3.1-6lqfk6f
- source /tmp_user/juno/sonics/dist/source_juno_all.sh --compiler=$COMPILER --mpi=$MPI_LIB
script:
- echo "Runner directory is $PWD; move to working directory $CUSTOM_CI_DIR"
- export SLURM_EXACT=1
- export I_MPI_PMI_LIBRARY=/usr/lib64/libpmi.so
- cd $CUSTOM_CI_DIR/build$MATRIX_KEY
# - ./pdm_run -srun # Pour l'instant ne marche pas avec openmpi
- ./pdm_run
- if [ "${BUILD_TYPE}" == "Coverage" ]; then
- cd $CUSTOM_CI_DIR/build$MATRIX_KEY/src/CMakeFiles/pdm.dir
- for d in */ ; do cd $d && gcov -b -l -p -c *.gcno && cd .. ; done
- cd $CUSTOM_CI_DIR/build$MATRIX_KEY
- gcovr --gcov-ignore-parse-errors -g -k --xml-pretty --print-summary --root $CUSTOM_CI_DIR --object-directory $CUSTOM_CI_DIR/build$MATRIX_KEY --output coverage.xml
- fi
# - cd $CUSTOM_CI_DIR/build$MATRIX_KEY
# - ctest --output-junit $CI_PROJECT_DIR/paradigm_ctest$MATRIX_KEY.xml
# # Artefacts are searched in CI_PROJECT_DIR, but job was executed in CUSTOM_CI_DIR
# #- ctest -V --output-junit $CI_PROJECT_DIR/paradigm_ctest$MATRIX_KEY.xml
# # Go back to runner dir for artifact modification
after_script:
- echo $PWD
- cd $CI_PROJECT_DIR
- sed -i '/testsuite name/c\<testsuite name="'"$MATRIX_KEY"'"' paradigm_ctest$MATRIX_KEY.xml
- sed -i 's/" classname/_'"$MATRIX_KEY"'" classname/' paradigm_ctest$MATRIX_KEY.xml
when: on_success
coverage: /lines:\s*(\d+\.\d+)%/
artifacts:
when: always
reports:
junit: paradigm_ctest$MATRIX_KEY.xml
coverage_report:
coverage_format: cobertura
path: build$MATRIX_KEY/coverage.xml
# non_regression:
# variables:
# COMPILER: "gcc@10"
# GNUM64: "ON"
# MPI_LIB: "impi"
# MATRIX_KEY: _${COMPILER}_${MPI_LIB}_GNUM64_${GNUM64}
# stage: test
# before_script:
# - module purge
# - source /scratchm/sonics/dist/spiro_el8.sh --compiler=$COMPILER --mpi=$MPI_LIB && module load py-gcovr-4.2-gcc-8.3.1-6lqfk6f
# script:
# - echo "Runner directory is $PWD; move to working directory $CUSTOM_CI_DIR"
# - cd $CUSTOM_CI_DIR/build$MATRIX_KEY
# - mkdir -p reports
# - export LSAN_OPTIONS=suppressions=$CUSTOM_CI_DIR/script/asan/asan.supp
# - echo $LSAN_OPTIONS
# - ./script/prepare_ci/run_top_test_base.sh --log_file_name reports/output_alltest_pdm --matrix_key ${MATRIX_KEY} --output_xml $CI_PROJECT_DIR/paradigm_alltest$MATRIX_KEY.xml
# artifacts:
# when: always
# reports:
# junit: paradigm_alltest$MATRIX_KEY.xml
# TODO :
# - Rajouter des regles pour faire plus de compilo quand on merge sur dev : impi + clang + pgi par exemple
# rules:
# - if: $CI_COMMIT_BRANCH == "dev"
# Rajouter int/long
# Tester si paradigm se compiler seul (sans paradigma)
pages:
stage: deploy
rules:
- if: $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "dev" || $CI_COMMIT_TAG != null
before_script:
- ''
script:
- mkdir -p public
- echo "CI_COMMIT_TAG = ${CI_COMMIT_TAG}"
- if [ "${CI_COMMIT_TAG}" == "" ]; then
- cp -r $CUSTOM_CI_DIR/build_intel@2022_intel-oneapi_GNUM64_ON_BUILD_Debug_PDMA_ON/doc/sphinx/html public/$CI_COMMIT_BRANCH
- else
- cp -r $CUSTOM_CI_DIR/build_intel@2022_intel-oneapi_GNUM64_ON_BUILD_Debug_PDMA_ON/doc/sphinx/html public/$CI_COMMIT_TAG
- fi
artifacts:
paths:
- public
expire_in: never