Skip to content

Commit

Permalink
Merge pull request #19 from 130s/jade/impr/travis
Browse files Browse the repository at this point in the history
Update Travis conf for Ubuntu Trusty and ROS Jade. Add ROS prerelease test.
  • Loading branch information
davetcoleman committed Apr 22, 2016
2 parents 16d5988 + db26750 commit 0f803a1
Showing 1 changed file with 35 additions and 45 deletions.
80 changes: 35 additions & 45 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,41 @@
# Generic MoveIt Travis Continuous Integration Configuration File
# Works with all MoveIt! repositories/branches
# Author: Dave Coleman, Jonathan Bohren
language:
- cpp
- python
python:
- "2.7"
# This config file for Travis CI utilizes ros-industrial/industrial_ci package.
# For more info for the package, see https://github.com/ros-industrial/industrial_ci/blob/master/README.rst
sudo: required
dist: trusty
services:
- docker
language: generic
compiler:
- gcc
notifications:
email:
on_success: always
on_failure: always
recipients:
- [email protected]
on_success: change #[always|never|change] # default: change
on_failure: change #[always|never|change] # default: always
before_install: # Use this to prepare the system to install prerequisites or dependencies
# Define some config vars
- export ROS_DISTRO=hydro
- export CI_SOURCE_PATH=$(pwd)
- export REPOSITORY_NAME=${PWD##*/}
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
- sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'
- wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
- sudo apt-get update -qq
- sudo apt-get install -qq -y python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-catkin ros-$ROS_DISTRO-ros
# MongoDB hack - I don't fully understand this but its for moveit_warehouse
- sudo apt-get remove -y mongodb mongodb-10gen
- sudo apt-get install -y mongodb-clients mongodb-server -o Dpkg::Options::="--force-confdef" # default actions
# Setup rosdep
- sudo rosdep init
- rosdep update
install: # Use this to install any prerequisites or dependencies necessary to run your build
# Create workspace
- mkdir -p ~/ros/ws_moveit/src
- cd ~/ros/ws_moveit/src
- wstool init .
# Download non-debian stuff
- wstool merge https://raw.github.com/ros-planning/moveit_docs/hydro-devel/moveit.rosinstall
- wstool update
# Delete the moveit.rosinstall version of this repo and use the one of the branch we are testing
- rm -rf $REPOSITORY_NAME
- ln -s $CI_SOURCE_PATH . # Link the repo we are testing to the new workspace
- cd ../
# Install dependencies for source repos
- rosdep install --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y
before_script: # Use this to prepare your build for testing e.g. copy database configurations, environment variables, etc.
- source /opt/ros/$ROS_DISTRO/setup.bash
script: # All commands must exit with code 0 on success. Anything else is considered failure.
- catkin_make -j2

- [email protected]
env:
matrix:
- ROS_DISTRO="jade" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu USE_DEB=true
- ROS_DISTRO="jade" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu USE_DEB=true
- ROS_DISTRO="jade" PRERELEASE=true
- ROS_DISTRO="indigo" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu USE_DEB=true
- ROS_DISTRO="indigo" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu USE_DEB=true
matrix:
allow_failures:
- env: ROS_DISTRO="jade" PRERELEASE=true # Run docker-based ROS prerelease test http://wiki.ros.org/bloom/Tutorials/PrereleaseTest Because we might not want to run prerelease test for all PRs, it's omitted from pass-fail criteria.
- env: ROS_DISTRO="indigo" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu USE_DEB=true
- env: ROS_DISTRO="indigo" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu USE_DEB=true
install:
- if [[ ${PRERELEASE} == true ]]; then sudo usermod -aG docker ubuntu; fi
# ROS Buildfarm for prerelease http://wiki.ros.org/regression_tests#How_do_I_setup_my_system_to_run_a_prerelease.3F
- if [[ ${PRERELEASE} == true ]]; then sudo -E sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'; fi
- if [[ ${PRERELEASE} == true ]]; then sudo -E apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-key 0xB01FA116; fi
# Buildfarm workaround for Python3 http://wiki.ros.org/regression_tests#How_do_I_setup_my_system_to_run_a_prerelease.3F
- if [[ ${PRERELEASE} == true ]]; then sudo -E apt-get update && sudo -E apt-get install python3 python3-pip python-ros-buildfarm; fi
- if [[ ${PRERELEASE} == true ]]; then sudo python3 -m pip install -U EmPy; fi
script:
- if [[ ${PRERELEASE} == true ]]; then mkdir -p /tmp/prerelease_job; cd /tmp/prerelease_job; generate_prerelease_script.py https://raw.githubusercontent.com/ros-infrastructure/ros_buildfarm_config/production/index.yaml jade default ubuntu trusty amd64 moveit_msgs --level 1 --output-dir ./; fi
- if [[ ${PRERELEASE} == true ]]; then ./prerelease.sh; fi
- if [[ ${PRERELEASE} != true ]]; then git clone https://github.com/ros-industrial/industrial_ci.git .ci_config && source .ci_config/travis.sh; fi
# - source ./travis.sh # Enable this when you have a package-local script

0 comments on commit 0f803a1

Please sign in to comment.