forked from cogsys-tuebingen/csapex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
183 lines (142 loc) · 3.69 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
175
176
177
178
179
180
181
182
183
before_script:
# Install ssh-agent if not already installed, it is required by Docker.
# (change apt-get to yum if you use a CentOS-based image)
- 'apt-get -qq update -y && apt-get -qq install build-essential openssh-client sudo ccache lcov -y'
# Run ssh-agent (inside the build environment)
- eval $(ssh-agent -s)
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
- ssh-add <(echo "$SSH_PRIVATE_KEY")
# For Docker builds disable host key checking. Be aware that by adding that
# you are suspectible to man-in-the-middle attacks.
# WARNING: Use this only with the Docker executor, if you use it with shell
# you will overwrite your user's SSH config.
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- source /opt/ros/$(ls /opt/ros/ | sort -r | head -n 1)/setup.bash
- apt-get install -y $(rosdep install --from-paths -i -y -s src | grep 'apt-get install' | rev | cut -f1 -d' ' | rev | paste -s)
# ccache
- mkdir -p ccache
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/ccache
- export PATH=/usr/lib/ccache:$PATH
stages:
- build
- test
- coverage
- documentation
cache:
paths:
- ccache/
indigo-build:
stage: build
image: ros:indigo-perception
artifacts:
paths:
- build.tar
expire_in: 1 day
script:
- catkin_make
- tar cf build.tar build devel
indigo-test:
stage: test
image: ros:indigo-perception
dependencies:
- indigo-build
script:
- tar xf build.tar
- source devel/setup.bash
- cd build && env CTEST_OUTPUT_ON_FAILURE=1 make test
jade-build:
stage: build
image: ros:jade-perception
artifacts:
paths:
- build.tar
expire_in: 1 day
script:
- catkin_make
- tar cf build.tar build devel
jade-test:
stage: test
image: ros:jade-perception
dependencies:
- jade-build
script:
- tar xf build.tar
- source devel/setup.bash
- cd build && env CTEST_OUTPUT_ON_FAILURE=1 make test
kinetic-build:
stage: build
image: ros:kinetic-perception
artifacts:
paths:
- build.tar
expire_in: 1 day
script:
- catkin_make
- tar cf build.tar build devel
kinetic-test:
stage: test
image: ros:kinetic-perception
dependencies:
- kinetic-build
script:
- tar xf build.tar
- source devel/setup.bash
- cd build && env CTEST_OUTPUT_ON_FAILURE=1 make test
lunar-build:
stage: build
image: ros:lunar-perception
artifacts:
paths:
- build.tar
expire_in: 1 day
script:
- catkin_make
- tar cf build.tar build devel
lunar-test:
stage: test
image: ros:lunar-perception
dependencies:
- lunar-build
script:
- tar xf build.tar
- source devel/setup.bash
- cd build && env CTEST_OUTPUT_ON_FAILURE=1 make test
melodic-build:
stage: build
image: ros:melodic-perception
artifacts:
paths:
- build.tar
expire_in: 1 day
script:
- catkin_make
- tar cf build.tar build devel
melodic-test:
stage: test
image: ros:melodic-perception
dependencies:
- melodic-build
script:
- tar xf build.tar
- source devel/setup.bash
- cd build && env CTEST_OUTPUT_ON_FAILURE=1 make test
coverage:
stage: coverage
image: ros:melodic-perception
script:
- catkin_make -DCMAKE_BUILD_TYPE:=Debug -DENABLE_COVERAGE:=True
- find / -name ui_box.h
- source devel/setup.bash
- env BUILD_DIR=build IS_CI=1 src/csapex_testing/coverage.sh
documentation:
stage: documentation
image: alpine
before_script:
- apk add --update doxygen ttf-freefont graphviz
script:
- mkdir -p public && doxygen doc/Doxyfile && mv doc/html/ public/doc/
artifacts:
paths:
- public/