-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path.gitlab-ci.yml
70 lines (64 loc) · 2.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
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
libeigen3-dev
libyaml-cpp-dev
libtbb-dev
libopencv-dev
libpcl1-dev
libyaml-cpp-dev
python-catkin-tools
libtinyxml-dev
sudo -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'
- GIT_USER=gitlab
- GIT_HOST=$CI_SERVER_HOST
- if [ ! -z "$GIT_USER_OVERRIDE" ]; then GIT_USER=$GIT_USER_OVERRIDE; fi
# Here we are at /build/$CI_PROJECT_NAME
# For pure catkin projects, we need a workspace:
- mkdir -p /build/ws/src/
- cd /build/ws
- ln -s $CI_PROJECT_DIR src/$CI_PROJECT_NAME
# clone dependencies here:
- cd src
- git clone $GIT_USER@$GIT_HOST:libs/cslibs_indexed_storage.git -b devel cslibs_indexed_storage
- git clone $GIT_USER@$GIT_HOST:libs/cslibs_time.git -b devel cslibs_time
- git clone $GIT_USER@$GIT_HOST:libs/cslibs_gridmaps.git -b devel cslibs_gridmaps
- git clone $GIT_USER@$GIT_HOST:libs/cslibs_math.git -b devel cslibs_math
- git clone $GIT_USER@$GIT_HOST:libs/cslibs_utility.git -b devel cslibs_utility
- git clone $GIT_USER@$GIT_HOST:libs/cslibs_plugins.git -b devel cslibs_plugins
- cd /build/ws/
stages:
- build
kinetic:
stage: build
image: ros:kinetic
script:
- sudo apt-get install -y software-properties-common
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update
- sudo apt-get install -y g++-7 gcc-7
- source /opt/ros/$(ls /opt/ros/ | sort -r | head -n 1)/setup.bash
- rosdep install -y -r -i --from-paths src
- catkin build -DCMAKE_C_COMPILER=/usr/bin/gcc-7 -DCMAKE_CXX_COMPILER=/usr/bin/g++-7
- catkin run_tests cslibs_ndt cslibs_ndt_2d cslibs_ndt_3d --no-deps
melodic:
stage: build
image: ros:melodic
script:
- source /opt/ros/$(ls /opt/ros/ | sort -r | head -n 1)/setup.bash
- rosdep install -y -r -i --from-paths src
- catkin build
- catkin run_tests cslibs_ndt cslibs_ndt_2d cslibs_ndt_3d --no-deps