forked from telekom/sysrepo-plugin-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
88 lines (69 loc) · 1.7 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
image: ${SYSREPO_CICD_IMAGE}
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- build
- test
build:default:
stage: build
script:
- mkdir build
- cmake -S . -B build/ -DSYSTEMD_IFINDEX=1 -DENABLE_BUILD_TESTS=ON -DENABLE_AUGEAS_PLUGIN=ON -DCMAKE_C_COMPILER=clang
- cmake --build build/
artifacts:
paths:
- build/
build:sanitized:
stage: build
script:
- mkdir build-sanitized
- cmake -S . -B build-sanitized/ -DSYSTEMD_IFINDEX=1 -DENABLE_BUILD_TESTS=ON -DENABLE_AUGEAS_PLUGIN=ON -DCMAKE_C_COMPILER=clang -DCMAKE_C_FLAGS=\"-fsanitize=address,undefined\" -DENABLE_SANITIZER=ON
- cmake --build build-sanitized/
artifacts:
paths:
- build-sanitized/
build:sanitized_memory:
stage: build
script:
- mkdir build-sanitized-memory
- cmake -S . -B build-sanitized-memory/ -DSYSTEMD_IFINDEX=1 -DENABLE_BUILD_TESTS=ON -DENABLE_AUGEAS_PLUGIN=ON -DCMAKE_C_COMPILER=clang -DCMAKE_C_FLAGS=\"-fsanitize=memory\" -DENABLE_SANITIZER=ON
- cmake --build build-sanitized-memory/
artifacts:
paths:
- build-sanitized-memory/
test:default:
stage: test
needs: ["build:default"]
script:
- cd build
- ctest -V
artifacts:
paths:
- build/
test:sanitized:
stage: test
needs: ["build:sanitized"]
script:
- cd build-sanitized
- ctest -V
artifacts:
paths:
- build-sanitized/
test:sanitized_memory:
stage: test
needs: ["build:sanitized_memory"]
script:
- cd build-sanitized-memory
- ctest -V
artifacts:
paths:
- build-sanitized-memory/
test:valgrind:
stage: test
needs: ["build:default"]
script:
- cd build
- ctest -T memcheck -V
artifacts:
paths:
- build/