Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attempting to use industrial_ci for travis builds. #138

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 23 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,37 @@
sudo: required
language: generic
# 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
services:
- docker

branches:
except:
- gh-pages
language: generic
compiler:
- gcc

env:
global:
- CONTAINER_NAME=catkin_pip_docker
# This will check any ROS distro supported on this OS
# checking devel and install separately so that they don't influence each other (dependencies, path, env, etc.)
- VERBOSE_OUTPUT=true
matrix:
- ROS_DISTRO=indigo ROS_FLOW=devel
- ROS_DISTRO=indigo ROS_FLOW=install
- ROS_DISTRO=jade ROS_FLOW=devel
- ROS_DISTRO=jade ROS_FLOW=install
- ROS_DISTRO=kinetic ROS_FLOW=devel
- ROS_DISTRO=kinetic ROS_FLOW=install
# TODO : test all possible flows (installing deps on devel or not, etc.)
# add NOT_TEST_BUILD=true NOT_TEST_INSTALL=true to skip build or install tests
- ROS_DISTRO="indigo" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
- ROS_DISTRO="indigo" PRERELEASE=true
- ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
- ROS_DISTRO="kinetic" PRERELEASE=true
- ROS_DISTRO="lunar" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
- ROS_DISTRO="lunar" PRERELEASE=true

before_install:
# Getting docker ros image
- docker pull ros:${ROS_DISTRO}-ros-core
# Running as daemon
- docker run --name ${CONTAINER_NAME} -d -t ros:${ROS_DISTRO}-ros-core /bin/bash | tee container.id
# Checking current container
- docker ps -a
- docker exec -ti ${CONTAINER_NAME} hostname
- docker exec -ti ${CONTAINER_NAME} uname -a
- docker exec -ti ${CONTAINER_NAME} cat /etc/lsb-release
matrix:
allow_failures:
# 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" PRERELEASE=true
- env: ROS_DISTRO="kinetic" PRERELEASE=true
- env: ROS_DISTRO="lunar" PRERELEASE=true

install:
# refreshing packages
- docker exec -ti ${CONTAINER_NAME} apt-get update
# TMP Patch because rosdep doesnt declare a dependency to sudo yet (2016-08-25) and it doesnt come with xenial
- docker exec -ti ${CONTAINER_NAME} apt-get install sudo -y
- docker exec -ti ${CONTAINER_NAME} rosdep update
# copying local clone to the running container (volume is currently broken)
- docker cp . ${CONTAINER_NAME}:/git_clone
# Installing package dependencies
- docker exec -ti ${CONTAINER_NAME} rosdep install --default-yes --from-paths /git_clone --rosdistro $ROS_DISTRO
- git clone https://github.com/ros-industrial/industrial_ci.git test/.ci_config

# full ROS setup, build and test
script:
- CONTAINER_ID=$(cat container.id)
- docker ps -a
- docker exec -ti ${CONTAINER_NAME} /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash && rospack profile"
# Passing env vars here since passing in docker run currently breaks (2016-08-25)
- docker exec -ti ${CONTAINER_NAME} /bin/bash -c "export ROS_DISTRO=$ROS_DISTRO && export ROS_FLOW=$ROS_FLOW && /git_clone/travis_checks.bash"
- docker stop "${CONTAINER_ID}"
# Since we need to run the test/CMakeLists.txt with travis
- cd test/ && .ci_config/travis.sh

notifications:
email: false
Expand Down