-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (75 loc) · 3.14 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
78
79
80
81
82
83
84
# Generic .travis.yml file for running continuous integration on Travis-CI for
# any ROS package.
#
# Available here:
# - https://github.com/felixduvallet/ros-travis-integration
#
# This installs ROS on a clean Travis-CI virtual machine, creates a ROS
# workspace, resolves all listed dependencies, and sets environment variables
# (setup.bash). Then, it compiles the entire ROS workspace (ensuring there are
# no compilation errors), and runs all the tests. If any of the compilation/test
# phases fail, the build is marked as a failure.
#
# We handle two types of package dependencies specified in the package manifest:
# - system dependencies that can be installed using `rosdep`, including other
# ROS packages and system libraries. These dependencies must be known to
# `rosdistro` and are installed using apt-get.
# - package dependencies that must be checked out from source. These are handled by
# `wstool`, and should be listed in a file named dependencies.rosinstall.
#
################################################################################
# General setup
sudo: required
cache:
- apt
language: python
matrix:
include:
- name: "Bionic melodic"
dist: bionic
env: ROS_DISTRO=melodic
# Environmental variables. All variables are global now.
env:
global:
- ROS_CI_DESKTOP="`lsb_release -cs`"
- CI_SOURCE_PATH=$(pwd)
- ROSINSTALL_FILE=$CI_SOURCE_PATH/dependencies.rosinstall
- ROS_PARALLEL_JOBS='-j8 -l6'
- PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages
################################################################################
# Install system dependencies, namely a very barebones ROS setup.
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://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
- sudo apt-get update -qq
- sudo apt-get update
- sudo apt-get install python-catkin-pkg python-catkin-tools python-rosdep python-wstool ros-$ROS_DISTRO-catkin
- sudo apt-get install -y python-rosinstall python-rosinstall-generator build-essential
- sudo apt-get install python-pip python-dev
- sudo apt-get install -y ros-$ROS_DISTRO-pcl-ros ros-$ROS_DISTRO-tf2-geometry-msgs
- source /opt/ros/$ROS_DISTRO/setup.bash
- echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc
- source ~/.bashrc
# Prepare rosdep to install dependencies.
- sudo rosdep init
- rosdep update --include-eol-distros # Support EOL distros.
# Create a catkin workspace with the package under integration.
install:
- mkdir -p ~/catkin_ws/src
- cd ~/catkin_ws/src
- catkin_init_workspace
- cd ~/catkin_ws
- catkin_make
- source devel/setup.bash
- cd ~/catkin_ws/src
- ln -s $CI_SOURCE_PATH .
# Install package dependencies.
before_script:
- cd ~/catkin_ws
- rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
################################################################################
# Compile.
script:
- source /opt/ros/$ROS_DISTRO/setup.bash
- cd ~/catkin_ws
- catkin_make