-
Notifications
You must be signed in to change notification settings - Fork 291
/
.travis.sh
executable file
·37 lines (32 loc) · 1.29 KB
/
.travis.sh
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
#!/bin/bash
set -x
set -e
apt-get update
apt-get install -y sudo software-properties-common git wget sed
# fix stopping tzdata for 18.04
echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections
echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
sudo sh -c "echo \"deb ${REPOSITORY} `lsb_release -cs` main\" > /etc/apt/sources.list.d/ros-latest.list"
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update -qq
sudo apt-get install -qq -y python-rosdep python-catkin-tools python-wstool ros-${ROS_DISTRO}-catkin
sudo rosdep init
rosdep update --include-eol-distros
# script:
(cd ${CI_SOURCE_PATH}; git log --oneline | head -10)
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
ln -sf ${CI_SOURCE_PATH} src/${REPOSITORY_NAME}
wstool init src
[ -e src/${REPOSITORY_NAME}/.rosinstall.${ROS_DISTRO} ] && wstool merge -t src src/${REPOSITORY_NAME}/.rosinstall.${ROS_DISTRO}
wstool update -t src --continue-on-error
rosdep install --from-paths src -y -r -q --ignore-src --rosdistro ${ROS_DISTRO}
source /opt/ros/${ROS_DISTRO}/setup.bash
env | grep ROS
rosversion catkin
# Build
catkin build -v -i --summarize --no-status -p 1 -j 1 --no-notify # every 5 mim
# Run tests
catkin run_tests
# check test (this only works on indigo)
catkin_test_results --verbose build