|
1 | | -# Use ubuntu Trusty (14.04) with sudo privileges. No support for Xenial yet. |
2 | | -dist: trusty |
3 | 1 | sudo: required |
4 | | -language: |
5 | | - - generic |
6 | | -cache: |
7 | | - - apt |
8 | | - |
9 | | -env: |
10 | | - global: |
11 | | - - ROS_DISTRO=indigo |
12 | | - - ROS_CI_DESKTOP="`lsb_release -cs`" # e.g. [precise|trusty|...] |
13 | | - - CI_SOURCE_PATH=$(pwd) |
14 | | - - ROSINSTALL_FILE=$CI_SOURCE_PATH/dependencies.rosinstall |
15 | | - - CATKIN_OPTIONS=$CI_SOURCE_PATH/catkin.options |
16 | | - - ROS_PARALLEL_JOBS='-j8 -l6' |
| 2 | +language: generic |
| 3 | +dist: trusty |
17 | 4 |
|
18 | | -################################################################################ |
| 5 | +matrix: |
| 6 | + include: |
| 7 | + - name: "Kinetic" |
| 8 | + env: ROS_DISTRO=kinetic |
19 | 9 |
|
20 | | -# Install system dependencies, namely a very barebones ROS setup. |
21 | | -before_install: |
22 | | - - sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list" |
23 | | - - sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 0xB01FA116 |
24 | | - - sudo apt-get update -qq |
25 | | - - sudo apt-get install -y python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-catkin |
26 | | - - source /opt/ros/$ROS_DISTRO/setup.bash |
27 | | - # Prepare rosdep to install dependencies. |
28 | | - - sudo rosdep init |
29 | | - - rosdep update |
| 10 | + - name: "Melodic" |
| 11 | + env: ROS_DISTRO=melodic |
30 | 12 |
|
31 | | -# Create a catkin workspace with the package under integration. |
32 | 13 | install: |
33 | | - - mkdir -p ~/catkin_ws/src |
34 | | - - cd ~/catkin_ws/src |
35 | | - - catkin_init_workspace |
36 | | - # Create the devel/setup.bash (run catkin_make with an empty workspace) and |
37 | | - # source it to set the path variables. |
38 | | - - cd ~/catkin_ws |
39 | | - - catkin_make |
40 | | - - source devel/setup.bash |
41 | | - # Add the package under integration to the workspace using a symlink. |
42 | | - - cd ~/catkin_ws/src |
43 | | - - ln -s $CI_SOURCE_PATH . |
| 14 | + - git clone https://github.com/ros-industrial/industrial_ci.git .ci_config |
44 | 15 |
|
45 | | -# Install all dependencies, using wstool first and rosdep second. |
46 | | -before_script: |
47 | | - # source dependencies: install using wstool. |
48 | | - - cd ~/catkin_ws/src |
49 | | - - wstool init |
50 | | - - if [[ -f $ROSINSTALL_FILE ]] ; then wstool merge $ROSINSTALL_FILE ; fi |
51 | | - - wstool up |
52 | | - # package depdencies: install using rosdep. |
53 | | - - cd ~/catkin_ws |
54 | | - - rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO |
55 | | - |
56 | | -# Compile and test (mark the build as failed if any step fails). If the |
57 | | -# CATKIN_OPTIONS file exists, use it as an argument to catkin_make, for example |
58 | | -# to blacklist certain packages. |
59 | | -# |
60 | | -# NOTE on testing: `catkin_make run_tests` will show the output of the tests |
61 | | -# (gtest, nosetest, etc..) but always returns 0 (success) even if a test |
62 | | -# fails. Running `catkin_test_results` aggregates all the results and returns |
63 | | -# non-zero when a test fails (which notifies Travis the build failed). |
64 | 16 | script: |
65 | | - - source /opt/ros/$ROS_DISTRO/setup.bash |
66 | | - - cd ~/catkin_ws |
67 | | - - catkin_make $( [ -f $CATKIN_OPTIONS ] && cat $CATKIN_OPTIONS ) |
68 | | - # Run the tests, ensuring the path is set correctly. |
69 | | - - source devel/setup.bash |
70 | | - - catkin_make run_tests && catkin_test_results |
71 | | - - catkin_make install |
72 | | - |
| 17 | + - .ci_config/travis.sh |
0 commit comments