forked from PX4/PX4-Avoidance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
77 lines (72 loc) · 2.76 KB
/
.travis.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
# Based on https://github.com/felixduvallet/ros-travis-integration
#
# vim:set ts=2 sw=2 et:
dist: xenial
sudo: required
language: generic
compiler:
- gcc
cache:
directories:
- $HOME/.cache/pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
cache:
- apt
env:
global:
- ROS_CI_DESKTOP="$(lsb_release -cs)"
- CI_SOURCE_PATH=$(pwd)
- ROS_DISTRO=kinetic
before_install:
- sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
- sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
- sudo apt-get update -qq
- sudo apt-get install -y build-essential git valgrind
- sudo apt-get install -y python-rosinstall python-rosinstall-generator python-wstool python-catkin-tools
# Install clang-format 3.8
- sudo apt-get install -y clang-format-3.8
# Install ROS Kinetic
- sudo apt-get install -y ros-$ROS_DISTRO-ros-base
# Install yaml-cpp ROS package
- sudo apt-get install -y libyaml-cpp-dev
# Install MavLink and Mavros
- sudo apt-get install -y ros-$ROS_DISTRO-mavlink ros-$ROS_DISTRO-mavros-msgs ros-$ROS_DISTRO-mavros ros-$ROS_DISTRO-mavros-extras
# Source environment
- source /opt/ros/$ROS_DISTRO/setup.bash
# Prepare rosdep
- sudo rosdep init
- rosdep update
install:
# Create catkin workspace
- mkdir -p ~/catkin_ws
- cd ~/catkin_ws
- catkin config --init --mkdirs
# Pull source depends
- cd src
- wstool init
# Link the repository we are testing to the new workspace
- ln -s $CI_SOURCE_PATH .
# Install dependency
- cd ~/catkin_ws
- rosdep install --from-paths src --ignore-src --rosdistro $ROS_DISTRO -q -y
# Install GeographicLib datasets
- sudo -H 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
- sudo -H ./install_geographiclib_datasets.sh
before_script:
# Source environment
- source /opt/ros/$ROS_DISTRO/setup.bash
script:
- set -e
- cd ~/catkin_ws
- catkin build
- source ~/catkin_ws/devel/setup.bash
# Check for clang format
- cd src/avoidance
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
- ./check_code_format.sh
- catkin build local_planner global_planner --no-deps -v -i --catkin-make-args tests
- status=0 && for f in ~/catkin_ws/devel/lib/*/*-test; do valgrind --leak-check=full --track-origins=yes --error-exitcode=1 $f || status=1; done
- (roscore &) && for f in ~/catkin_ws/devel/lib/*/*-test-roscore; do valgrind --leak-check=full --track-origins=yes --error-exitcode=1 --suppressions=local_planner/test/valgrind_suppressions.sup $f || status=1; done && exit $status