-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
53 lines (47 loc) · 1015 Bytes
/
.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
stages:
- build
- test
image: odurc/c-dev-tools
variables:
GIT_SUBMODULE_STRATEGY: recursive
BUILD_DIR: "build"
CTEST_OUTPUT_ON_FAILURE: "True"
build:
stage: build
variables:
BUILD_TYPE: Debug
BUILD_OPTIONS: "-DENABLE_TESTS=Yes -DENABLE_LINTER=Yes -DENABLE_COVERAGE=Yes"
script:
- mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BUILD_OPTIONS} ..
- make -j$(nproc)
artifacts:
expire_in: 1 day
paths:
- ${BUILD_DIR}
coverage:
stage: test
script:
- cd ${BUILD_DIR}
- make test
- make coverage
- mv coverage ..
coverage: '/Percentage Coverage: (\d+.\d+%)$/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage/cobertura.xml
memcheck:
stage: test
script:
- cd ${BUILD_DIR}
- make test
- ctest -T memcheck
pages:
script:
- make doc -C ${BUILD_DIR}
- mv ${BUILD_DIR}/doc/html/ public/
artifacts:
paths:
- public