-
Notifications
You must be signed in to change notification settings - Fork 428
/
.gitlab-ci.yml
111 lines (98 loc) · 2.54 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
image: registry.gitlab.com/iniparser/docker-cmake:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
LD_LIBRARY_PATH: ${CI_BUILDS_DIR}/iniparser/iniparser/install/lib/
stages:
- build
- doc
- test
- win
build:
stage: build
script:
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=../install -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON ..
- make install
- tree -a .
artifacts:
paths:
- install/
- build/
pages:
stage: doc
dependencies:
- build
script:
- mv build/html/ public/
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
test:
stage: test
script:
- pwd
- ls -l
- cd build/
- ctest --verbose
dependencies:
- build
memcheck:
stage: test
script:
- pwd
- ls -l
- cd build/
- valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=255 ctest --verbose
dependencies:
- build
iniexample-memcheck:
stage: test
script:
- pwd
- tree
- cd install/share/doc/iniparser/examples/
- valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=255 ./iniexample
dependencies:
- build
iniwrite-memcheck:
stage: test
script:
- pwd
- tree
- cd install/share/doc/iniparser/examples/
- valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=255 ./iniwrite
dependencies:
- build
parse-memcheck:
stage: test
script:
- pwd
- tree
- cd install/share/doc/iniparser/examples/
- valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=255 ./parse
dependencies:
- build
.shared_windows_runners:
tags:
- saas-windows-medium-amd64
win-build:
extends:
- .shared_windows_runners
stage: win
script:
- git clone https://github.com/tronkko/dirent.git
- mkdir build
- cd build
- cmake -DCMAKE_INCLUDE_PATH="../dirent/include" -DBUILD_DOCS=OFF -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON ..
- cmake --build .
# due to the long provisioning time of the Windows runner, tests are
# executed in the same stage as the build
- ctest -C Debug --verbose
artifacts:
paths:
- install/
- build/
dependencies: []