-
Notifications
You must be signed in to change notification settings - Fork 5
/
.gitlab-ci.yml
86 lines (80 loc) · 2.87 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
variables:
GIT_SUBMODULE_STRATEGY: none
stages:
- build
- sonar
build_test_nix:
image: simgrid/ci-empty-nixos
stage: build
script:
- export NIX_ARGS="--arg doCoverage true --arg coverageCoveralls true --arg coverageGcovTxt true"
# Update external cache.
- nix-shell --pure ${NIX_ARGS} --command ${CI_PROJECT_DIR}/tools/ci/list-store-paths-for-cachix.bash | cachix push simgrid
# Build and test, with coverage.
- nix-build ${NIX_ARGS} && cp -rL result ./rsg
# Print coverage textual report, so Gitlab can attribute a coverage metrics to this job.
- cat ./rsg/cov-report/file-summary.txt
# Put gcov file at the right tree depth
- cp -r rsg/cov-report/gcov-txt ./
# Upload coverage data to codecov.io
- bash <(curl -s https://codecov.io/bash) -f ./rsg/cov-report/coveralls.json
artifacts:
when: always
paths:
- /builds/simgrid/remote-simgrid/gcov-txt
# pages:
# image: simgrid/ci-empty-nixos
# stage: deploy
# dependencies:
# - build_test_nix
# script:
# - mkdir -p public/coverage
# - mv rsg/cov/report-html/* public/coverage/
# artifacts:
# paths:
# - public
# only:
# - master
sonar_static_analysis:
image: simgrid/stable:v3.29
stage: sonar
dependencies:
- build_test_nix
script:
# Dependencies setup #
######################
- apt-get update
- apt-get install -y build-essential pkg-config meson ninja-build libboost-dev protobuf-compiler libprotobuf-dev # needed by rsg
- apt-get install -y python3 # needed by tesh
- apt-get install -y curl unzip default-jre-headless # needed by sonar
# manual docopt-c++ install
- apt-get install -y curl cmake
- export DOCOPT_REV=3394186f2951d3c7de3745b8c12dd930fe858768
- (cd / && curl -L "https://github.com/mpoquet/docopt.cpp/tarball/${DOCOPT_REV}" | tar -xz)
- (cd /mpoquet-docopt.cpp-3394186 && cmake . && make install)
# RSG build/test #
##################
- meson build
- ./sonarqube.sh ninja -C build -v
# Test that the git version of RSG compiles with various versions of SimGrid docker image
# The script is very similar to above, without sonar
.build_git: &build_git
stage: build
script:
# Dependencies setup #
######################
- apt-get update
- apt-get install -y build-essential pkg-config meson ninja-build libboost-dev protobuf-compiler libprotobuf-dev # needed by rsg
- apt-get install -y python3 # needed by tesh
# manual docopt-c++ install
- apt-get install -y curl cmake
- export DOCOPT_REV=3394186f2951d3c7de3745b8c12dd930fe858768
- (cd / && curl -L "https://github.com/mpoquet/docopt.cpp/tarball/${DOCOPT_REV}" | tar -xz)
- (cd /mpoquet-docopt.cpp-3394186 && cmake . && make install)
# RSG build/test #
##################
- meson build
- ninja -C build test -v
test-git-sg3.29:
image: simgrid/stable:v3.29
<<: *build_git