This repository has been archived by the owner on Jul 6, 2019. It is now read-only.
forked from PR2/pr2_pbd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (67 loc) · 2.55 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
# General setup
# -------------
language: python
python:
- "2.7"
# Allows the python virtualenv to use apt-get installed packages, which
# is essential (as ROS recommends this and pip doesn't seem to contain
# all packages, or contains them with errors).
virtualenv:
system_site_packages: true
# Allow caching of debian (apt-get) packages. This means they're cached
# on Travis, so we still have to download/install them, but it will be
# faster than going to the ubuntu repositories.
cache: apt
# Git settings.
# NOTE(mbforbes): Change this to groovy-devel when moving to PR2 repo.
branches:
only:
- style
# Before anything, see if we can get the mongoDB troubles out of the way.
# Note that this is a Travis-CI specific problem; this is not needed in
# general.
before_install:
- sudo apt-get --purge remove mongodb-10gen
# Commands to install dependencies
# --------------------------------
install:
# Update package list and install new versions.
- sudo apt-get update
- sudo apt-get upgrade
# First, move code to correct place. Also Travis-CI specific.
- mkdir -p ~/rosbuild_ws
- cd ..; mv pr2_pbd ~/rosbuild_ws/
# Settings to make installing script more general.
- export ROS_CI_DESKTOP=`lsb_release -cs` # e.g. 'precise'
- export ROS_CI_VERSION=groovy # e.g. 'groovy'
- export ROS_CI_PREFIX=ros-${ROS_CI_VERSION}- # e.g. 'ros-groovy-'
# Exports for ROS
- export ROS_HOSTNAME=localhost
- export ROS_MASTER_URI=http://localhost:11311
- export ROBOT=sim
# Add ROS repositories, setup keys, update
- echo "deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main" | sudo tee /etc/apt/sources.list.d/ros-latest.list
- wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
- yes | sudo apt-get -y update
# Main installation, ROS setup
- yes | sudo apt-get -y install ${ROS_CI_PREFIX}desktop-full
- sudo rosdep init
- rosdep update
# Environment setup
- source /opt/ros/${ROS_CI_VERSION}/setup.bash
# Add required debian and python packages with apt-get and pip.
- cd ~/rosbuild_ws/pr2_pbd
- yes | sudo apt-get -y install $(< packages.txt)
- pip install -r requirements.txt
# Initialize ROS workspace, setup, set path
- cd ~/rosbuild_ws
- rosws init . /opt/ros/${ROS_CI_VERSION}
- source ~/rosbuild_ws/setup.bash
- export ROS_PACKAGE_PATH=~/rosbuild_ws/:/opt/ros/${ROS_CI_VERSION}/share:/opt/ros/${ROS_CI_VERSION}/stacks
# Make messages
- cd pr2_pbd
- rosmake
# Command to run tests
# --------------------
script:
- rostest pr2_pbd_interaction test_endtoend.test