-
-
Notifications
You must be signed in to change notification settings - Fork 377
/
.gitlab-ci.yml
84 lines (75 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
.job_template: &ros_job
image: ros:kinetic-perception
before_script:
- export TERM=xterm
- export SHELL=/bin/bash
- git submodule update --init
- apt-get update -yq
- apt-get install -yq python-catkin-tools libqt4-dev libqglviewer-dev gcovr
- mkdir build
- cd build
tags:
- docker
.job_template: &rosless_job
image: ubuntu:16.04
# check the cache
cache:
key: apt-cache
paths:
- apt-cache/
before_script:
- export TERM=xterm
- export SHELL=/bin/bash
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
- sudo apt-get update -yq && sudo apt-get install -y foo
- apt-get update -yq
- apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y
build-essential cmake python-pip python-empy git
libopencv-dev libboost-all-dev libgtest-dev libeigen3-dev
libqt4-dev libqglviewer-dev
- pip install catkin-tools
- git submodule update --init
- shopt -s extglob
- mkdir this_package
- mv !(this_package) this_package/
- mkdir src
- mv this_package src/
- git clone https://github.com/ros/catkin.git src/catkin/
- catkin init
- catkin build --no-status
tags:
- docker
image: ros:kinetic-perception
cache:
key: apt-cache
paths:
- apt-cache/
stages:
- build
- test
ros_build:
<<: *ros_job
stage: build
script:
- cmake .. -DBUILD_WITH_COVERAGE=YES
- make -j4
artifacts:
paths:
- ./
expire_in: 20 mins
test:
# uses artifacts from ros build
stage: test
before_script:
- apt-get update -yq
- apt-get install gcovr
script:
- cd build
- ctest -VV
- gcovr -r ../src/ .
rosless_build:
<<: *rosless_job
stage: build
script:
- catkin init
- catkin build --no-status --verbose