forked from Doodle1106/mavros_controllers
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
41 lines (38 loc) · 1.63 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
image: ros:kinetic-ros-base-xenial
variables:
USE_ROSDEP: "true"
ROS_DISTRO: "kinetic"
CI_SOURCE_PATH: $(pwd)
ROSINSTALL_FILE: dependencies.rosinstall
before_script:
- apt-get update
- apt-get -y --quiet --no-install-recommends install apt-utils geographiclib-tools libgeographic-dev python-pip python-setuptools python-catkin-pkg python-rosdep python-wstool ros-kinetic-catkin python-catkin-tools python-rosinstall-generator ros-kinetic-mavros ros-kinetic-mavros-extras libeigen3-dev ros-kinetic-gazebo-msgs
# Create catkin workspace
- mkdir -p ~/catkin_ws/src
- cd ~/catkin_ws/src
- ln -s $CI_PROJECT_DIR .
- cd ~/catkin_ws
- catkin config --init --mkdirs
- catkin config --merge-devel
# Pull source depends
- wstool init src
- wstool merge -t src src/mavros_controllers/$ROSINSTALL_FILE
# Link the repo we are testing to the new workspace
# Install dependencies using rosdep
- wstool update -t src -j4
- rosdep install --from-paths src --ignore-src --rosdistro $ROS_DISTRO -q -y
# Install GeographicLib datasets (for Ubuntu Trusty - can only download geoid model)
- mkdir -p /usr/share/geographiclib
- wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
- chmod +x install_geographiclib_datasets.sh
- ./install_geographiclib_datasets.sh
- source /opt/ros/$ROS_DISTRO/setup.bash
catkin_build:
stage: build
script:
- cd ~/catkin_ws/src
- git clone https://gitlab.com/VictorLamoine/ros_gitlab_ci.git
- cd ~/catkin_ws
- catkin build --no-status --summary
- source devel/setup.bash
- catkin run_tests --no-status -p1 -i --summary