diff --git a/.travis.yml b/.travis.yml index 9f7de74..1ca79bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,8 @@ -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 +language: generic branches: except: @@ -9,51 +10,22 @@ branches: env: global: - - CONTAINER_NAME=pyros_utils_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 + - WRITABLE_SOURCE=true # needed by pip (creates egg-info in source) + - AFTER_SCRIPT='$CATKIN_WORKSPACE/install/env.sh python -m nose pyros_utils' + - ROS_PARALLEL_JOBS="-j1" # to avoid tests breaking each other 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 - -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 - # Switching to use ros shadow fixed packages - - docker exec -ti ${CONTAINER_NAME} /bin/bash -c "sed -i.bak -e s,packages.ros.org/ros/ubuntu,packages.ros.org/ros-shadow-fixed/ubuntu, /etc/apt/sources.list.d/ros-latest.list" - # 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 + # We are only interested in shadow-fixed compatibility here + - ROS_DISTRO=indigo DOCKER_IMAGE=rosindustrial/ci:indigo-trusty-shadow-fixed + - ROS_DISTRO=kinetic DOCKER_IMAGE=rosindustrial/ci:kinetic-xenial-shadow-fixed + - ROS_DISTRO=lunar DOCKER_IMAGE=rosindustrial/ci:lunar-xenial-shadow-fixed 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 -b target-repo-rw https://github.com/ipa-mdl/industrial_ci.git .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}" + - .ci_config/travis.sh notifications: email: false + diff --git a/README.rst b/README.rst index e45f9a0..58aca81 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,8 @@ Pyros-utils =========== -.. image:: https://travis-ci.org/asmodehn/pyros-utils.svg?branch=indigo - :target: https://travis-ci.org/asmodehn/pyros-utils +.. image:: https://travis-ci.org/pyros-dev/pyros-utils.svg?branch=devel + :target: https://travis-ci.org/pyros-dev/pyros-utils This is a ROS package, providing useful ROS addons for pyros. diff --git a/travis_checks.bash b/travis_checks.bash deleted file mode 100755 index 40ff40d..0000000 --- a/travis_checks.bash +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -set -e - -# first we ensure we change to the directory where this script is. -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $DIR - -# This script run basic checks on this project. -# It is used by travis and can also be used by a developer for checking his current working tree. -# -# These variables need to be setup before calling this script: -# ROS_DISTRO [indigo | jade | kinetic] -# ROS_FLOW [devel | install] - -# For travis docker, this is already done by the entrypoint in docker image. -# However when using 'docker exec' we still need to source it ourselves. -# Also it is mandatory when this script is run directly by the developer. -source /opt/ros/$ROS_DISTRO/setup.bash - -mkdir -p testbuild -cd testbuild -cmake .. -DCMAKE_INSTALL_PREFIX=./install -if [ "$ROS_FLOW" == "devel" ]; then - make -j1 - source devel/setup.bash - make -j1 tests - make -j1 run_tests - catkin_test_results . -elif [ "$ROS_FLOW" == "install" ]; then - make -j1 install - source install/setup.bash - python -m nose pyros_utils -fi