|
1 | | -branches: |
2 | | - only: |
3 | | - - master |
| 1 | +# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). |
| 2 | +# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) |
4 | 3 |
|
5 | 4 | notifications: |
6 | | - on_success: never |
7 | | - on_failure: never |
8 | | - |
9 | | -os : |
10 | | - - linux |
11 | | - |
12 | | -dist: |
13 | | - - trusty |
14 | | - |
15 | | -sudo: |
16 | | - - required |
17 | | - |
18 | | - |
19 | | -language: |
20 | | - - generic |
21 | | - |
| 5 | + email: |
| 6 | + if: branch = master |
| 7 | + on_success: change |
| 8 | + on_failure: always |
22 | 9 | services: |
23 | 10 | - docker |
24 | 11 |
|
25 | | -matrix: |
26 | | - include: |
27 | | - - env: DOCKER_VERSION=indigo-desktop-trusty |
28 | | - - env: DOCKER_VERSION=kinetic-desktop-xenial |
| 12 | +# include the following block if the C/C++ build artifacts should get cached by Travis, |
| 13 | +# CCACHE_DIR needs to get set as well to actually fill the cache |
| 14 | +cache: |
| 15 | + directories: |
| 16 | + - $HOME/.ccache |
| 17 | + |
| 18 | +git: |
| 19 | + quiet: true # optional, silences the cloning of the target repository |
29 | 20 |
|
| 21 | +# configure the build environment(s) |
| 22 | +# https://github.com/ros-industrial/industrial_ci/blob/master/doc/index.rst#variables-you-can-configure |
30 | 23 | env: |
31 | | - global: |
32 | | - - CI_SOURCE_PATH=$(pwd) |
| 24 | + global: # global settings for all jobs |
| 25 | + - ROS_REPO=ros |
| 26 | + - CCACHE_DIR=$HOME/.ccache # enables C/C++ caching in industrial_ci |
| 27 | + matrix: # each line is a job |
| 28 | + - ROS_DISTRO="indigo" |
| 29 | + - ROS_DISTRO="kinetic" |
| 30 | + - ROS_DISTRO="melodic" |
| 31 | + |
| 32 | +# allow failures, e.g. for unsupported distros |
| 33 | +matrix: |
| 34 | + allow_failures: |
| 35 | + - env: ROS_DISTRO="melodic" |
33 | 36 |
|
| 37 | +# clone and run industrial_ci |
34 | 38 | install: |
35 | | - - sudo docker pull osrf/ros:$DOCKER_VERSION |
36 | | - |
| 39 | + - git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .industrial_ci -b master |
37 | 40 | script: |
38 | | - - sudo docker run -t -d --name=$DOCKER_VERSION -v $CI_SOURCE_PATH/../:/catkin_ws/src/ osrf/ros:$DOCKER_VERSION bash |
39 | | - - sudo docker exec -i $DOCKER_VERSION apt-get update |
40 | | - - sudo docker exec -i $DOCKER_VERSION apt-get upgrade -y |
41 | | - - sudo docker exec -i $DOCKER_VERSION rosdep update --include-eol-distros |
42 | | - - sudo docker exec -i $DOCKER_VERSION rosdep install -i -y --from-paths /catkin_ws/src/naoqi_driver |
43 | | - - sudo docker exec -i $DOCKER_VERSION bash -c 'source /opt/ros/*/setup.bash; catkin_make --directory catkin_ws/' |
44 | | - - sudo docker exec -i $DOCKER_VERSION bash -c 'source /opt/ros/*/setup.bash; catkin_make run_tests --directory /catkin_ws/' |
45 | | - |
46 | | -after_script: |
47 | | - - sudo docker stop $DOCKER_VERSION |
| 41 | + - .industrial_ci/travis.sh |
0 commit comments