forked from RoboSherlock/robosherlock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
83 lines (73 loc) · 2.84 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
sudo: required
dist: xenial
language: cpp
cache:
ccache: true
directories:
- apt
services: mongodb
addons:
apt:
packages:
- libicu-dev
- libboost-all-dev
env:
global:
- ROS_DISTRO=kinetic
- ROS_CI_DESKTOP="`lsb_release -cs`" # e.g. [precise|trusty|...]
- ROS_PARALLEL_JOBS='-j4 -l4'
- CI_SOURCE_PATH=$(pwd)
- CATKIN_OPTIONS=$CI_SOURCE_PATH/catkin.options
before_install:
- 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 add-apt-repository ppa:robosherlock/ppa -y
- sudo apt-get update -qq
- sudo apt-get install -y python-catkin-pkg python-rosdep python-wstool ros-kinetic-catkin ros-kinetic-libmongocxx-ros libxerces-c-dev libapr1-dev mongodb protobuf-compiler rapidjson lcov --force-yes
- source /opt/ros/$ROS_DISTRO/setup.bash
- sudo rosdep init
- rosdep update
- echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
- echo "export PYTHON_EXECUTABLE=/usr/bin/python" >> ~/.bashrc
- echo "export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/dist-packages" >> ~/.bashrc
- source ~/.bashrc
install:
- mkdir -p ~/catkin_ws/src
- cd ~/catkin_ws/src
- catkin_init_workspace
- cd ../
- catkin_make
- source devel/setup.bash
- cd ~/catkin_ws/src
- ln -s $CI_SOURCE_PATH .
before_script:
- cd ~/catkin_ws/src
- git clone https://github.com/RoboSherlock/robosherlock_msgs.git
- git clone https://github.com/RoboSherlock/uimacpp_ros.git
- cd ~/catkin_ws
- rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
- echo "export APR_HOME=/usr" >> ~/.bashrc
- echo "export ICU_HOME=/usr" >> ~/.bashrc
- echo "export XERCES_HOME=/usr" >> ~/.bashrc
- echo "export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}" >> ~/.bashrc
- . ~/.bashrc
script:
- cd ~/catkin_ws
- source devel/setup.bash
- find -L /home/travis/catkin_ws/src/robosherlock -name include -type d
- catkin_make "$( [ -f $CATKIN_OPTIONS ] && cat $CATKIN_OPTIONS )"
- source devel/setup.bash
- cd ~/catkin_ws/src/robosherlock
- lcov -c -i -d ~/catkin_ws -o coverage_base.info
- cd ~/catkin_ws
- roscore&
- catkin_make run_tests_robosherlock
- catkin_test_results
after_script:
- cd ~/catkin_ws/src/robosherlock
- lcov --directory ~/catkin_ws/ --capture --output-file coverage_test.info
- lcov -a coverage_base.info -a coverage_test.info -o ~/catkin_ws/src/robosherlock/coverage_total.info
- lcov --remove coverage_total.info '/usr/*' --output-file coverage_total.info
- lcov --extract coverage_total.info '*robosherlock*' --output-file coverage_total.info
- lcov --list coverage_total.info
- bash <(curl -s https://codecov.io/bash) -X gcov -f ~/catkin_ws/src/robosherlock/coverage_total.info || echo "Codecov did not collect coverage reports"