-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
49 lines (46 loc) · 1.01 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
variables:
GIT_SUBMODULE_STRATEGY: recursive
image: ruby:alpine
before_script:
- ruby -v
- apk update
- apk add bash build-base bison git curl valgrind gcovr
- which ruby
test:
variables:
RED_TEXT: "\e[10m"
GREEN_TEXT: "\e[32m"
LRED_TEXT: "\e[91m"
NORMAL_TEXT: "\e[0m"
tags:
- cpp
script:
- LEAKCHECK=1 make
- gcovr --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml --root ${CI_PROJECT_DIR}
coverage: /^\s*lines:\s*\d+.\d+\%/
artifacts:
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
pages:
tags:
- cpp
stage: deploy
script:
- apk add py3-pip
- python -m venv .
- . bin/activate
- pip install gcovr
- make coverage
- mkdir .public
- cp coverage.html .public/index.html
- cp coverage.* .public
- du -h .public
- mv .public public
artifacts:
paths:
- public
only:
- master