forked from KITmedical/kacanopen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
92 lines (66 loc) · 2.36 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# This file is based on https://github.com/felixduvallet/ros-travis-integration
dist: trusty
sudo: required
language:
- generic
cache:
- apt
env:
global:
# Installation
- ROS_DISTRO=jade
- ROS_CI_DESKTOP="`lsb_release -cs`" # e.g. [precise|trusty|...]
- CI_SOURCE_PATH=$(pwd)
- ROS_PARALLEL_JOBS='-j8 -l6'
# Compilation
- ARGS+="-DPCAN_PREFIX=peak"
- ARGS+="-DBUILD_ALL_DRIVERS=On"
matrix:
- CXX=clang++-3.6 CC=gcc ARGS+="-DCMAKE_BUILD_TYPE=Debug"
- CXX=g++-4.9 CC=gcc ARGS+="-DCMAKE_BUILD_TYPE=Release"
before_install:
# Add repos
- sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
- wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
- sudo apt-add-repository -y ppa:george-edison55/cmake-3.x # cmake
- sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test # g++
- sudo apt-get update -qq
# Install ROS...
- sudo apt-get install -y python-catkin-pkg python-rosdep python-wstool
- sudo apt-get install -y ros-$ROS_DISTRO-catkin ros-$ROS_DISTRO-roscpp ros-$ROS_DISTRO-std-msgs ros-$ROS_DISTRO-sensor-msgs ros-$ROS_DISTRO-message-runtime
- source /opt/ros/$ROS_DISTRO/setup.bash
# Prepare rosdep to install dependencies.
# - sudo rosdep init
# - rosdep update
# Recent cmake, clang and c++
- sudo apt-get install -y cmake clang-3.6 g++-4.9
# Boost
- sudo apt-get install -y libboost-system-dev libboost-filesystem-dev
# Create a Catkin workspace
install:
- mkdir -p ~/catkin_ws/src
- cd ~/catkin_ws/src
- catkin_init_workspace
# Create the devel/setup.bash (run catkin_make with an empty workspace) and
# source it to set the path variables.
- cd ~/catkin_ws
- catkin_make
- source devel/setup.bash
# Add the package under integration to the workspace using a symlink.
- cd ~/catkin_ws/src
- ln -s $CI_SOURCE_PATH .
# build pcan host driver
- cd ~/catkin_ws
- wget http://www.peak-system.com/fileadmin/media/linux/files/peak-linux-driver-7.15.2.tar.gz
- tar -xzf peak-linux-driver-7.15.2.tar.gz
- mv peak-linux-driver-7.15.2 peak
- cd peak
- make --silent
# Compile and test.
script:
- cd ~/catkin_ws
- catkin_make $ARGS
# This always returns 0, but looks pretty.
# - catkin_make run_tests $ARGS
# This will return non-zero if a test fails.
# - catkin_make test $ARGS