1- language : cpp
1+
2+ sudo : required
3+ dist : trusty
4+ # Force travis to use its minimal image with default Python settings
5+ language : generic
26compiler :
37 - gcc
8+ env :
9+ global :
10+ - CATKIN_WS=~/catkin_ws
11+ - CATKIN_WS_SRC=${CATKIN_WS}/src
12+ matrix :
13+ - CI_ROS_DISTRO="indigo"
14+ - CI_ROS_DISTRO="jade"
415install :
5- # - if [ $TRAVIS_BRANCH = 'indigo-devel' ]; export CI_ROS_DISTRO=indigo; fi
6- # - if [ $TRAVIS_BRANCH = 'jade-devel' ]; export CI_ROS_DISTRO=jade; fi
7- - export CI_ROS_DISTRO=indigo
8- - echo $CI_ROS_DISTRO
9- # Add ROS repositories
10- - sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'
16+ - sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
1117 - wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
12- - sudo apt-get update
13- # Install and initialize rosdep
14- - sudo apt-get install python-rosdep python-rosinstall-generator python-wstool
15- - sudo `which rosdep` init
18+ - sudo apt-get update -qq
19+ - sudo apt-get install -qq -y python-rosdep python-catkin-tools
20+ - sudo rosdep init
1621 - rosdep update
17- # Use rosinstall_generator and wstool to get the software (no debs for indigo+)
18- - mkdir deps
19- - cd deps
20- - touch CATKIN_IGNORE
21- - rosinstall_generator --rosdistro $CI_ROS_DISTRO --tar --deps --deps-only stage_ros > deps.rosinstall
22- - wstool init ./src -j10 deps.rosinstall
23- # Temporarily get std_srvs until a new version of stage_ros is released
24- - rosinstall_generator --rosdistro $CI_ROS_DISTRO --tar std_srvs > std_srvs.rosinstall
25- - wstool merge -t src std_srvs.rosinstall
26- - wstool up -t src
27- # Use rosdep to get the missing dependencies, except console bridge and lz4
28- - rosdep install --default-yes --from-paths ./src --ignore-src --rosdistro $CI_ROS_DISTRO --skip-keys lz4 --skip-keys libconsole-bridge-dev
29- # Get lz4
30- - sudo add-apt-repository -y ppa:gezakovacs/lz4
31- - sudo apt-get update
32- - sudo apt-get install -y liblz4-dev
33- # Get libconsole-bridge-dev package for precise
34- - mkdir build_console_bridge
35- - cd build_console_bridge
36- - git clone https://github.com/ros/console_bridge.git
37- - cd console_bridge/
38- - mkdir build
39- - cd build/
40- - cmake ..
41- - make
42- - sudo make install
43- - cd ../../..
44- # Build the deps
45- - ./src/catkin/bin/catkin_make_isolated --install -j1
46- - cd ..
22+ # Use rosdep to install all dependencies (including ROS itself)
23+ - rosdep install --from-paths ./ -i -y --rosdistro $CI_ROS_DISTRO
4724script :
48- - source deps/install_isolated/setup.bash
49- - mkdir build
50- - cd build
51- - cmake .. -DCMAKE_INSTALL_PREFIX=./install
52- - make -j1
53- - make -j1 run_tests
54- - catkin_test_results .
55- - make -j1 install
56- notifications :
57- email : false
25+ - source /opt/ros/$CI_ROS_DISTRO/setup.bash
26+ - mkdir -p $CATKIN_WS_SRC
27+ - ln -s $TRAVIS_BUILD_DIR $CATKIN_WS_SRC
28+ - cd $CATKIN_WS
29+ - catkin init
30+ # Enable install space
31+ - catkin config --install
32+ # Build [and Install] packages
33+ - catkin build --no-status -i --no-notify -DCMAKE_BUILD_TYPE=Release
34+ # Build tests
35+ - catkin build --no-status -i --no-notify --make-args tests
36+ # Run tests
37+ - catkin run_tests
0 commit comments