forked from k-okada/2015-soft3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (37 loc) · 1.78 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
sudo: required
language:
- cpp
- python
python:
- "2.7"
compiler:
- gcc
notifications:
email:
on_success: always
on_failure: always
env:
- ROS_DISTRO=hydro
install:
- 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-shadow-fixed/ubuntu `lsb_release -cs` 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 ros-hydro-desktop ros-hydro-roscpp-tutorials ros-hydro-rostest ros-hydro-catkin python-catkin-tools
- sudo apt-get install -qq -y ros-hydro-roseus
- sudo apt-get install -qq -y liborbit2 liborbit2-dev
- sudo apt-get install -qq -y swi-prolog
- source /opt/ros/hydro/setup.bash
before_script:
- ls
- for dir in 20*; do echo "checking $dir"; pkg_dir=`catkin_topological_order $dir`; pkg="${pkg_dir% *}"; src="${pkg_dir##* }"; check=`ls $dir/check*.* 2>/dev/null`; if [ -e "$dir/$src" -a "$check" ] ; then cp $dir/check*.* $dir/$src; fi; done;
- find . -iname *.test
- rdir=`pwd`
script:
- for dir in 20*; do echo "checking $dir"; pkg_dir=`catkin_topological_order $dir`; pkg="${pkg_dir% *}"; src="${pkg_dir##* }"; check=`ls $dir/check*.* 2>/dev/null`; if [ -e "$dir/$src" -a "$check" ] ; then source /opt/ros/hydro/setup.bash; cd $dir; catkin build -v -i; source devel/setup.bash; rospack list; cd $src; EXIT_STATUS=0; for test_file in check*.test; do rostest $pkg $test_file || EXIT_STATUS=1; done; cd $rdir; fi; done; [ $EXIT_STATUS == 0 ]
after_failure:
- find src/ -type d -name .git -prune -o -type f -exec ls -l {} \;
- rostest -t beginner_tutorials check1.test
- rostest -t beginner_tutorials check2.test