forked from Ip-umd/The_Warehouse_Helper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
180 lines (169 loc) · 9.77 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# 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.
#
# There are envioronment variables you may want to change, such as ROS_DISTRO,
# ROSINSTALL_FILE, and the CATKIN_OPTIONS file. See the README.md for more
# information on these flags, and
# https://docs.travis-ci.com/user/environment-variables/ for information about
# Travis environment variables in general.
#
# Author: Felix Duvallet <felixd@gmail.com>
# NOTE: The build lifecycle on Travis.ci is something like this:
# before_install
# install
# before_script
# script
# after_success or after_failure
# after_script
# OPTIONAL before_deploy
# OPTIONAL deploy
# OPTIONAL after_deploy
################################################################################
dist: xenial
sudo: required
cache: apt
language: generic
# Configuration variables. All variables are global
env:
global:
- ROS_DISTRO=kinetic
- ROS_CI_DESKTOP="`lsb_release -cs`" # e.g. [precise|trusty|...]
- CI_SOURCE_PATH=$(pwd)
- ROSINSTALL_FILE=$CI_SOURCE_PATH/tiago_public.rosinstall
- CATKIN_OPTIONS=$CI_SOURCE_PATH/catkin.options
- ROS_PARALLEL_JOBS='-j8 -l6'
################################################################################
# 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://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
- sudo apt-get update -qq
- sudo apt-get install dpkg
- sudo apt-get install -y python-catkin-pkg python-rosdep python-wstool --allow-unauthenticated
# Add opencv support in ROS
#- sudo apt-get install libopencv-dev
# install lcov to generate code coverage data
- sudo apt-get install -y lcov --allow-unauthenticated
# Needed to install coveralls-lcov to upload coverage information generated by LCOV to coveralls.io
- gem install coveralls-lcov
# Install ROS-Base: (Bare Bones) ROS package, build, and communication libraries. No GUI tools.
- sudo apt-get install -y ros-kinetic-desktop-full --allow-unauthenticated
- sudo apt-get install ros-$ROS_DISTRO-ros-base --allow-unauthenticated
- sudo apt-get install ros-$ROS_DISTRO-move-base ros-$ROS_DISTRO-move-base ros-$ROS_DISTRO-std-msgs ros-$ROS_DISTRO-sensor-msgs ros-$ROS_DISTRO-geometry-msgs --allow-unauthenticated
- source /opt/ros/$ROS_DISTRO/setup.bash
- sudo apt-get install ros-$ROS_DISTRO-python-qt-binding --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-urdf-geometry-parser --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-humanoid-nav-msgs --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-carrot-planner --allow-unauthenticated
# - sudo -H ros-kinetic-control-msgs ros-kinetic-control-toolbox --allow-unauthenticated
# - sudo -H ros-kinetic-kdl-conversions ros-kinetic-orocos-kdl --allow-unauthenticated
# - sudo -H ros-kinetic-python-orocos-kdl ros-kinetic-realtime-tools --allow-unauthenticated
- sudo -H apt-get install ros-kinetic-eband-local-planner --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-moveit-planners-ompl --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-teb-local-planner --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-diagnostic-updater --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-global-planner --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-urdf-test --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-fake-localization --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-pointcloud-to-laserscan --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-moveit-ros-visualization --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-moveit-ros-planning-interface --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-octomap-server --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-dwa-local-planner --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-moveit-commander --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-libuvc-camera --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-four-wheel-steering-msgs --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-joy --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-uvc-camera --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-map-server --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-twist-mux --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-sick-tim --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-moveit-ros-move-group --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-gmapping --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-range-sensor-layer --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-moveit-simple-controller-manager --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-depthimage-to-laserscan --allow-unauthenticated
- sudo -H apt-get install -y python-pyside --allow-unauthenticated
- sudo -H apt-get install -y libpyside-dev --allow-unauthenticated
- sudo -H apt-get install -y libshiboken-dev --allow-unauthenticated
- sudo -H apt-get install -y shiboken --allow-unauthenticated
- sudo -H apt-get install -y python-qt4 --allow-unauthenticated
- sudo -H apt-get install -y python-qt4-dev --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-amcl --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-openni2-launch --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-rqt-gui-py --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-joint-state-publisher --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-polled-camera --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-laser-filters --allow-unauthenticated
- sudo -H apt-get install -y libgazebo7-dev --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-tf2-geometry-msgs --allow-unauthenticated
- sudo -H apt-get install -y ros-kinetic-image-transport-plugins --allow-unauthenticated
- sudo -H apt-get install -y gazebo7 --allow-unauthenticated
-
# Prepare rosdep to install dependencies.
- sudo rosdep init
- rosdep update
# Install
# Create a catkin workspace with the package under integration.
install:
# Create a catkin workspace
- mkdir -p ~/catkin_ws/src
- cd ~/catkin_ws/src
- catkin_init_workspace
# Create the devel/setup.bash (run catkin_make with an empty workspace) and
# source it to set the path variables.
- cd ~/catkin_ws
- catkin_make
- source devel/setup.bash
# Add the package under integration to the workspace using a symlink.
- cd ~/catkin_ws/src
- ln -s $CI_SOURCE_PATH .
# Install all dependencies, using wstool first and rosdep second.
# wstool looks for a ROSINSTALL_FILE defined in the environment variables.
before_script:
# source dependencies: install using wstool.
- cd ~/catkin_ws/src
- wstool init
- if [[ -f $ROSINSTALL_FILE ]] ; then wstool merge $ROSINSTALL_FILE ; fi
- wstool up
# package depdencies: install using rosdep.
- cd ~/catkin_ws
- rosdep install -y -r --from-paths src --ignore-src --rosdistro kinetic --skip-keys="opencv2 opencv2-nonfree pal_laser_filters speed_limit_node sensor_to_cloud hokuyo_node libdw-dev python-graphitesend-pip python-statsd pal_filters pal_vo_server pal_usb_utils pal_pcl pal_pcl_points_throttle_and_filter pal_karto pal_local_joint_control camera_calibration_files pal_startup_msgs pal-orbbec-openni2 dummy_actuators_manager pal_local_planner gravity_compensation_controller current_limit_controller dynamic_footprint dynamixel_cpp tf_lookup"
# Compile and test (mark the build as failed if any step fails). If the
# CATKIN_OPTIONS file exists, use it as an argument to catkin_make, for example
# to blacklist certain packages.
#
# NOTE on testing: `catkin_make run_tests` will show the output of the tests
# (gtest, nosetest, etc..) but always returns 0 (success) even if a test
# fails. Running `catkin_test_results` aggregates all the results and returns
# non-zero when a test fails (which notifies Travis the build failed).
script:
- source /opt/ros/$ROS_DISTRO/setup.bash
- cd ~/catkin_ws
- catkin_make $( [ -f $CATKIN_OPTIONS ] && cat $CATKIN_OPTIONS )
# Run the tests, ensuring the path is set correctly.
- source devel/setup.bash
# - catkin_make run_tests && catkin_test_results
# - rostest The_Warehouse_Helper warehouseHelperTest.launch
after_success:
- cd ~/catkin_ws/build
- lcov --directory . --capture --output-file coverage.info
- lcov --remove coverage.info '/opt/*' '/usr/*' '*/devel/*' '*test_*' '*_test*' --output-file coverage.info
- lcov --list coverage.info
- coveralls-lcov coverage.info