-
Notifications
You must be signed in to change notification settings - Fork 93
/
Copy path.gitlab-ci-inria.yml
470 lines (443 loc) · 19 KB
/
.gitlab-ci-inria.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
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
# gitlab-ci-local --file .gitlab-ci-inria.yml <job>
coverage:
image: debian:testing
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
tags:
- large # Inria infra
script:
- apt-get --allow-releaseinfo-change update
- apt install -y python3-coverage gcovr build-essential ninja-build cmake libboost-dev libgraphviz-dev nlohmann-json3-dev default-jdk-headless python3-dev pybind11-dev python3-all libns3-dev
- mkdir build ; cd build
- cmake -GNinja -Denable_python=ON -Denable_ns3=ON -Denable_java=ON -Denable_documentation=OFF -Denable_testsuite_smpi_MPICH3=ON -Denable_testsuite_McMini=ON -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON -DLTO_EXTRA_FLAG="auto"
-Denable_memcheck=OFF -Denable_memcheck_xml=OFF -Denable_coverage=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
- ninja --verbose all tests
- export PYTHON_TOOL_OPTIONS="/usr/bin/python3-coverage run --parallel-mode --branch"
- ctest --no-compress-output -D ExperimentalTest --output-junit ../result.xml -j$(nproc) --output-on-failure || true
- ctest -D ExperimentalCoverage || true
# convert python coverage reports in xml ones
- find .. -size +1c -name ".coverage*" -exec mv {} . \;
- /usr/bin/python3-coverage combine
- /usr/bin/python3-coverage xml --ignore-errors -o ../python_coverage.xml
# convert all gcov reports to xml cobertura reports
- gcovr --root .. --xml-pretty -e ../teshsuite -e MBI -e ../examples/smpi/NAS -e ../examples/smpi/mc -u -o ../xml_coverage.xml --gcov-ignore-parse-errors all --gcov-ignore-errors all
coverage: '/^TOTAL.*\s+(\d+\%)$/'
artifacts:
expire_in: 6 months
paths:
- ./*_coverage.xml
- result.xml
reports:
coverage_report:
coverage_format: cobertura
# Captures several files
path: ./*_coverage.xml
junit: result.xml
# ###################################################################################################
# ###################################################################################################
# ###################################################################################################
stages:
- pre-test
- test
# pre-test contains:
# - Smoke tests that are fast jobs. If they fail, no need to run the other tests
# - Docker image refresh
# test contains the regular build+test on a large set of distros
variables:
DOCKER_DRIVER: overlay2
docker_build:
image: docker:latest
stage: pre-test
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
tags:
- small # Inria infra
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- tools/docker/build_on_need.sh $CI_REGISTRY_IMAGE/build-deps:latest tools/docker/Dockerfile.build-deps
.cached-build:
variables:
FF_USE_FASTZIP: "true"
CACHE_COMPRESSION_LEVEL: "fast"
cache:
key: ccache-$CI_JOB_NAME
paths:
- ccache
when: 'always'
# Use ccache transparently, and print stats before/after
before_script:
- export PATH="/usr/lib/ccache:$PATH"
- export CCACHE_BASEDIR="$PWD"
- export CCACHE_DIR="$PWD/ccache"
- export CCACHE_COMPILERCHECK=content
- ccache --zero-stats || true
- ccache --show-stats || true
after_script:
- export CCACHE_DIR="$PWD/ccache"
- ccache --show-stats
# Fast job running on a manually managed openstack node, thus out of docker, and with ccache setup. Fail fail fast on trivial errors.
make-distcheck:
extends: .cached-build
stage: pre-test
# interruptible means "Abort the pipeline if another commit comes when we're in this job". Would not play well here, as we are not in docker.
interruptible: false
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
tags:
- debian-testing # Private runner on the inria infra, not docker but openstack node
script:
- mkdir -p build && cd build
- export JAVA_HOME=/usr/lib/jvm/java-22-openjdk-amd64
- cmake -Denable_python=ON -Denable_java=ON -Denable_documentation=OFF -Denable_testsuite_smpi_MPICH3=ON -Denable_testsuite_McMini=ON -Denable_compile_warnings=ON ..
- make distcheck
artifacts:
when: always
expire_in: 6 months
reports:
junit: result.xml
# Test the Python build
build-pip:
stage: test
image: $CI_REGISTRY_IMAGE/build-deps:latest
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
tags: # Select a runner
- medium # Inria infra
script:
- apt-get --allow-releaseinfo-change update
- apt install -y python3-pip cmake libboost-dev g++ gcc pybind11-dev python3-build python3.11-venv
- python3 -m build --outdir dist
artifacts:
paths:
- dist/
expire_in: 2 weeks
# ###################################################################################################
# ###################################################################################################
# ###################################################################################################
alpine-release:
image: alpine:latest
stage: test
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
tags:
- large # Inria infra
script:
- apk add --no-cache build-base git cmake python3 py3-pybind11-dev graphviz-dev eigen-dev boost-dev openjdk21-jdk valgrind-dev nlohmann-json fortify-headers
- export JAVA_HOME=/usr/lib/jvm/default-jvm
- cmake -Denable_python=ON -Denable_java=ON -Denable_documentation=OFF -Denable_compile_optimizations=ON -Denable_testsuite_smpi_MPICH3=ON -Denable_testsuite_McMini=ON -Denable_compile_warnings=ON -DLTO_EXTRA_FLAG="auto" .
- make VERBOSE=1 -j$(nproc) all tests
- ctest -T Test --output-junit result.xml -j$(nproc) --output-on-failure
artifacts:
when: always
expire_in: 6 months
reports:
junit: result.xml
debian-clang:
image: debian:testing
stage: test
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
tags:
- large # Inria infra
script:
- apt-get --allow-releaseinfo-change update
- apt install -y build-essential ninja-build clang libgcc-14-dev cmake libboost-dev libgraphviz-dev nlohmann-json3-dev default-jdk-headless python3-dev pybind11-dev python3-all libns3-dev
- rm -rf CMakeFiles CMakeCache.txt
- cmake -GNinja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -Denable_python=ON -Denable_java=ON -Denable_documentation=OFF -Denable_testsuite_smpi_MPICH3=ON -Denable_testsuite_McMini=ON -Denable_compile_warnings=ON -DLTO_EXTRA_FLAG="auto" .
- ninja --verbose all tests
- ctest -T Test --output-junit result.xml -j$(nproc) --output-on-failure
artifacts:
when: always
expire_in: 6 months
reports:
junit: result.xml
# We keep 2 LTS releases here, as that's about their lifetime
# https://wiki.ubuntu.com/Releases
ubuntu22-release:
image: ubuntu:22.04
stage: test
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
tags:
- large # Inria infra
script:
- apt-get --allow-releaseinfo-change update
- apt install -y libboost-stacktrace-dev python3-numpy-dev build-essential ninja-build cmake libboost-dev libgraphviz-dev nlohmann-json3-dev default-jdk-headless python3-dev pybind11-dev python3-all libns3-dev
- cmake -GNinja -Denable_python=ON -Denable_java=ON -Denable_documentation=OFF -Denable_testsuite_smpi_MPICH3=ON -Denable_testsuite_McMini=ON -Denable_compile_warnings=ON -DLTO_EXTRA_FLAG="auto" .
- ninja --verbose all tests
- ctest -T Test --output-junit result.xml -j$(nproc) --output-on-failure
artifacts:
when: always
expire_in: 6 months
reports:
junit: result.xml
ubuntu24-release:
image: ubuntu:24.04
stage: test
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
tags:
- large # Inria infra
script:
- apt-get --allow-releaseinfo-change update
- apt install -y libboost-stacktrace-dev python3-numpy-dev build-essential ninja-build cmake libboost-dev libgraphviz-dev nlohmann-json3-dev default-jdk-headless python3-dev pybind11-dev python3-all libns3-dev
- cmake -GNinja -Denable_python=ON -Denable_java=ON -Denable_documentation=OFF -Denable_testsuite_smpi_MPICH3=ON -Denable_testsuite_McMini=ON -Denable_compile_warnings=ON -DLTO_EXTRA_FLAG="auto" .
- ninja --verbose all tests
- ctest -T Test --output-junit result.xml -j$(nproc) --output-on-failure
artifacts:
when: always
expire_in: 6 months
reports:
junit: result.xml
fedora-rawhide-release:
image: fedora:rawhide
stage: test
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
tags:
- large # Inria infra
script:
- dnf install -y @development-tools ninja-build cmake g++ git cmake python3-devel pybind11-devel graphviz-devel eigen3-devel boost-devel java-latest-openjdk-devel valgrind-devel json-devel
- rm -rf CMakeFiles CMakeCache.txt
- cmake -GNinja -Denable_python=ON -Denable_java=ON -Denable_documentation=OFF -Denable_testsuite_smpi_MPICH3=ON -Denable_testsuite_McMini=ON -Denable_compile_warnings=ON -DLTO_EXTRA_FLAG="auto" .
- ninja --verbose all tests
- ctest -T Test --output-junit result.xml -j$(nproc) --output-on-failure
artifacts:
when: always
expire_in: 6 months
reports:
junit: result.xml
rocky-release:
image: rockylinux:9
stage: test
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
tags:
- large # Inria infra
script:
- yum install -y dnf-plugins-core # get the 'dnf config-manage' tool
- dnf config-manager --set-enabled crb # enable the repository for ninja package
# Still missing on Rocky Linux: nlohmann-json
- dnf install -y ninja-build cmake g++ gcc-c++ git cmake pybind11-devel python3-devel graphviz-devel eigen3-devel boost-devel java-21-openjdk-devel valgrind-devel diffutils
- rm -rf CMakeFiles CMakeCache.txt
- cmake -GNinja -Denable_python=ON -Denable_java=ON -Denable_documentation=OFF -Denable_testsuite_smpi_MPICH3=ON -Denable_testsuite_McMini=ON -Denable_compile_warnings=ON -DLTO_EXTRA_FLAG="auto" .
- ninja --verbose all tests
- ctest -T Test --output-junit result.xml -j$(nproc) --output-on-failure
artifacts:
when: always
expire_in: 6 months
reports:
junit: result.xml
opensuse-release:
image: opensuse/tumbleweed # tumbleweed is the rolling release with recent software
stage: test
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
tags:
- large # Inria infra
script:
- zypper install -y ninja cmake gcc-c++ git cmake python313-pybind11-devel python313-numpy-devel graphviz-devel eigen3-devel boost-devel libboost_context-devel java-21-openjdk-devel valgrind-devel diffutils nlohmann_json-devel
- rm -rf CMakeFiles CMakeCache.txt
- cmake -GNinja -Denable_python=ON -Denable_java=ON -Denable_documentation=OFF -Denable_testsuite_smpi_MPICH3=ON -Denable_testsuite_McMini=ON -Denable_compile_warnings=ON -DLTO_EXTRA_FLAG="auto" .
- ninja --verbose all tests
- ctest -T Test --output-junit result.xml -j$(nproc) --output-on-failure
artifacts:
when: always
expire_in: 6 months
reports:
junit: result.xml
docker-intelCC:
image: docker:latest
stage: pre-test
# It's OK if we cannot refresh the image for a while. Intel engineers sometimes need time.
allow_failure: true
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
tags:
- small # Inria infra
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- tools/docker/build_on_need.sh $CI_REGISTRY_IMAGE/intelcc:latest tools/docker/Dockerfile.intelCC
opensuse-intelCC:
needs: [docker-intelCC]
image: $CI_REGISTRY_IMAGE/intelcc:latest
stage: test
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
tags:
- large # Inria infra
script:
- source /opt/intel/oneapi/setvars.sh; cmake -GNinja -DCMAKE_CXX_COMPILER=icpx -DCMAKE_C_COMPILER=icx -Denable_python=ON -Denable_java=ON -Denable_documentation=OFF -Denable_testsuite_smpi_MPICH3=ON -Denable_testsuite_McMini=ON -Denable_compile_warnings=ON -DLTO_EXTRA_FLAG="auto" .
- ninja --verbose all tests
- ctest -T Test --output-junit result.xml -j$(nproc) --output-on-failure
artifacts:
when: always
expire_in: 6 months
reports:
junit: result.xml
arch-release:
image: archlinux:latest
stage: test
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
tags:
- large # Inria infra
script:
- pacman --noconfirm -Sy ninja cmake gcc git cmake python-build graphviz eigen boost jdk21-openjdk valgrind pybind11 python-numpy nlohmann-json diffutils
- rm -rf CMakeFiles CMakeCache.txt
- cmake -GNinja -Denable_python=ON -Denable_java=ON -Denable_documentation=OFF -Denable_testsuite_smpi_MPICH3=ON -Denable_testsuite_McMini=ON -Denable_compile_warnings=ON -DLTO_EXTRA_FLAG="auto" .
- ninja --verbose all tests
- ctest -T Test --output-junit result.xml -j$(nproc) --output-on-failure
artifacts:
when: always
expire_in: 6 months
reports:
junit: result.xml
freebsd:
stage: test
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
tags:
- freebsd
variables:
FF_ENABLE_JOB_CLEANUP: "true"
LD_LIBRARY_PATH: "/usr/local/lib/gcc13:/usr/local/flang/lib"
LIBRARY_PATH: "/usr/local/lib/gcc13:/usr/local/flang/lib"
script:
- rm -rf CMakeFiles CMakeCache.txt
- cmake -GNinja -Denable_java=ON -Denable_documentation=OFF -Denable_testsuite_smpi_MPICH3=ON -Denable_testsuite_McMini=ON -Denable_compile_warnings=ON -DLTO_EXTRA_FLAG="auto" -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .
- ninja --verbose all tests
- ctest -T Test --output-junit result.xml -j$(nproc) --output-on-failure
artifacts:
when: always
expire_in: 6 months
reports:
junit: result.xml
arm:
stage: test
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "push"'
tags:
- armv8
script:
- module use /opt/arm/modulefiles/:/opt/arm/moduledeps/
- module load acfl armpl
- rm -rf CMakeFiles CMakeCache.txt
- CC=armclang CXX=armclang++ FC=armflang cmake -Denable_java=ON -Denable_documentation=OFF -Denable_testsuite_smpi_MPICH3=ON -Denable_testsuite_McMini=ON -Denable_compile_warnings=ON -DLTO_EXTRA_FLAG="auto" -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .
- make VERBOSE=1 tests -j$(nproc)
- ctest -T Test --output-junit result.xml -j$(nproc) --output-on-failure
artifacts:
when: always
expire_in: 6 months
reports:
junit: result.xml
# ###################################################################################################
# ############# Daily jobs ##########################################################################
# ###################################################################################################
flags:
extends: .cached-build
image: $CI_REGISTRY_IMAGE/build-deps:latest
stage: test
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "schedule"'
tags:
- large # Inria infra
parallel:
matrix:
- MC: ["MC", "NO_MC"]
SMPI: ["SMPI", "NO_SMPI"]
DEBUG: ["DEBUG", "NO_DEBUG"]
script:
- export CXXFLAGS=-D_GLIBCXX_DEBUG
# We cannot put ON/OFF as values directly, or the job name is not instructive
- if [ ${MC} == "MC" ] ; then BUILD_MC="ON" ; else BUILD_MC="OFF" ; fi
- if [ ${SMPI} == "SMPI" ] ; then BUILD_SMPI="ON" ; else BUILD_SMPI="OFF" ; fi
- if [ ${DEBUG} == "DEBUG" ] ; then BUILD_DEBUG="ON" ; else BUILD_DEBUG="OFF" ; fi
- cmake -GNinja -Denable_python=ON -Denable_java=ON -Denable_documentation=OFF -Denable_SMPI=${BUILD_SMPI} -Denable_testsuite_smpi_MPICH3=${BUILD_SMPI} -Denable_model-checking=${BUILD_MC} -Denable_testsuite_McMini=${BUILD_MC} -Denable_debug=${BUILD_DEBUG} -Denable_compile_warnings=ON -DLTO_EXTRA_FLAG="auto" .
- ninja --verbose all tests
# Run the test in one config with GLIBCXX_DEBUG
- if [ "${BUILD_MC}/${BUILD_SMPI}/${BUILD_DEBUG}" = "ON/ON/ON" ]; then
ctest -T Test --output-junit result.xml -j$(nproc) --output-on-failure ;
fi
sonarqube:
#image: $CI_REGISTRY_IMAGE/build-deps:latest
image: simgrid/build-deps
variables:
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
script:
- apt-get --allow-releaseinfo-change update
- apt install -y unzip curl python3-coverage wget
# Install sonar wrapper and sonar scanner
- export SONAR_SCANNER_VERSION=7.0.2.4839
- export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux-x64
- curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux-x64.zip
- unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
- export PATH=$SONAR_SCANNER_HOME/bin:$PATH
- export SONAR_SCANNER_OPTS="-server"
- curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
- unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
- export PATH=$HOME/.sonar/build-wrapper-linux-x86:$PATH
# configure and build simgrid
- cmake -GNinja -Denable_python=ON -Denable_java=ON -Denable_documentation=OFF -Denable_testsuite_smpi_MPICH3=ON -Denable_testsuite_McMini=ON -Denable_coverage=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .
- build-wrapper-linux-x86-64 --out-dir bw-output ninja all tests
# Install Jacoco
- wget https://search.maven.org/remotecontent?filepath=org/jacoco/jacoco/0.8.12/jacoco-0.8.12.zip -O /tmp/jacoco.zip
- (cd /tmp ; unzip jacoco.zip)
- export JACOCO_PATH=/tmp/lib
- export JAVA_TOOL_OPTIONS="-javaagent:${JACOCO_PATH}/jacocoagent.jar"
# run the tests
- export PYTHON_TOOL_OPTIONS="/usr/bin/python3-coverage run --parallel-mode --branch"
- ctest -T Test --output-junit result.xml -j$(nproc) --output-on-failure || true
- ctest -D ExperimentalCoverage || true
# convert python coverage reports in xml ones
- find .. -size +1c -name ".coverage*" -exec mv {} . \;
- /usr/bin/python3-coverage combine
- /usr/bin/python3-coverage xml --ignore-errors -o ../python_coverage.xml
# Run the analysis
- unset JAVA_TOOL_OPTIONS
- sonar-scanner -Dsonar.organization=simgrid -Dsonar.projectKey=simgrid_simgrid -Dsonar.sources=. -Dsonar.cfamily.compile-commands=bw-output/compile_commands.json -Dsonar.host.url=https://sonarcloud.io
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
allow_failure: true
rules:
- if: '$CI_COMMIT_BRANCH == "stable"'
when: never
- if: '$CI_PIPELINE_SOURCE == "schedule"'
tags:
- large # Inria infra