-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
174 lines (152 loc) · 3.04 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
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
stages:
- run
.manual:
when: manual
build:
stage: run
before_script:
- g++ --version
- which g++
- cmake --version
- which cmake
script:
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- cmake --build . -j
- ctest --output-junit test_results.xml
artifacts:
reports:
junit: build/test_results.xml
tags:
- os:linux
- os:x86_64
build_with_warnings:
stage: run
before_script:
- g++ --version
- which g++
- cmake --version
- which cmake
script:
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_WARNINGS=ON ..
- cmake --build . -j
tags:
- os:linux
- os:x86_64
run_cppcheck:
stage: run
before_script:
- cppcheck --version
- which cppcheck
script:
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
- cppcheck --project=compile_commands.json --cppcheck-build-dir=./temp/cppcheck --error-exitcode=1 --enable=all
tags:
- os:linux
- os:x86_64
- cppcheck
run_clang_format:
stage: run
before_script:
- clang-format --version
- which clang-format
script:
- clang-format --dry-run -Werror --style=file src/bad_code.cpp
tags:
- os:linux
- os:x86_64
- clang-format
run_clang_tidy:
stage: run
before_script:
- clang-tidy --version
- which clang-tidy
script:
- mkdir build
- cd build
- cmake -DENABLE_CLANG_TIDY=ON ..
- cmake --build .
tags:
- os:linux
- os:x86_64
- clang-tidy
build_asan:
stage: run
before_script:
- g++ --version
- which g++
script:
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON ..
- cmake --build . -j
- ctest --output-on-failure
artifacts:
paths:
- ./build/Testing/Temporary/LastTest.log
when: on_failure
tags:
- os:linux
- os:x86_64
build_ubsan:
stage: run
before_script:
- g++ --version
- which g++
script:
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_UBSAN=ON ..
- cmake --build . -j
- ctest --output-on-failure
artifacts:
paths:
- ./build/Testing/Temporary/LastTest.log
when: on_failure
tags:
- os:linux
- os:x86_64
run_valgrind:
stage: run
before_script:
- valgrind --version
- which valgrind
script:
- mkdir build
- cd build
- cmake -DUSE_VALGRIND=ON ..
- cmake --build .
- ctest -T memcheck --output-on-failure
artifacts:
paths:
- ./build/Testing/Temporary/*
when: on_failure
tags:
- os:linux
- os:x86_64
- valgrind
build_coverage:
stage: run
before_script:
- gcovr --version
- which gcovr
script:
- mkdir build
- cd build
- cmake -DENABLE_COVERAGE=ON ..
- cmake --build .
- ctest
- cd ..
- gcovr -r . --html --html-details -o build/coverage/coverage.html
artifacts:
paths:
- ./build/coverage/*
tags:
- os:linux
- os:x86_64
- gcovr