-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
46 lines (41 loc) · 952 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
default:
image: alpine
tags:
- docker
before_script:
- apk add boost-dev cmake g++ gcovr ninja
stages:
- build
- test
- deploy
build:
stage: build
script:
- export CXXFLAGS=--coverage
- cmake -S . -B build/ -GNinja -DCMAKE_BUILD_TYPE=Debug
- cmake --build build/
artifacts:
untracked: true
test:
stage: test
coverage: '/lines:\s+(\d+\.\d+|\d+)%/'
script:
- cd build/
- ctest --output-on-failure
# Run coverage
- mkdir coverage
- gcovr -r .. --filter ../include --filter ../src --filter ../tests -j$(nproc) --html --html-title glob --html-details -o coverage/report.html -s
artifacts:
paths:
- 'build/coverage/*'
package:
stage: deploy
script:
- cd build/
- cpack -G ZIP
needs: ['build'] # Do not wait for test stage to complete
dependencies:
- build # We do not need artificats of the test stage
artifacts:
paths:
- "build/globpp-*.zip"