forked from squirrel-project/squirrel_planning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.install.sh
executable file
·38 lines (34 loc) · 1.77 KB
/
.travis.install.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
37
38
set -e
set -v
while true; do echo "INSTALL IS RUNNING" && sleep 60; done&
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty 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 > /dev/null 2>&1
sudo apt-get install -qq -y python-rosdep python-wstool > /dev/null 2>&1
sudo apt-get install -qq -y ros-${CI_ROS_DISTRO}-ros > /dev/null 2>&1 #needed as long as https://github.com/ros-infrastructure/rosdep/issues/430 is not fixed
sudo rosdep init
rosdep update
## SQUIRREL SPECIFIC ##
sudo sh -c 'echo "deb http://doc.openrobotino.org/download/packages/amd64 ./" > /etc/apt/sources.list.d/openrobotino.list'
sudo apt-get update
sudo apt-get install -qq -y --force-yes robotino-api2
# create empty underlay workspace
mkdir -p $CATKIN_WS_UNDERLAY_SRC
source /opt/ros/$CI_ROS_DISTRO/setup.bash > /dev/null 2>&1 # source release
catkin_init_workspace $CATKIN_WS_UNDERLAY_SRC
cd $CATKIN_WS_UNDERLAY
catkin_make -DCMAKE_BUILD_TYPE=Release # build empty underlay devel space
catkin_make -DCMAKE_BUILD_TYPE=Release install # build empty underlay install space
# populate underlay
if [ -f $TRAVIS_BUILD_DIR/.travis.rosinstall ]; then wstool init -j10 src $TRAVIS_BUILD_DIR/.travis.rosinstall; fi
if [ ! -f $TRAVIS_BUILD_DIR/.travis.rosinstall ]; then wstool init -j10 src $DEFAULT_ROSINSTALL; fi
# install dependencies from underlay
rosdep install -q --from-paths $CATKIN_WS_UNDERLAY_SRC -i -y --rosdistro $CI_ROS_DISTRO > /dev/null #2>&1
# build devel space of underlay
source $CATKIN_WS_UNDERLAY/devel/setup.bash > /dev/null 2>&1 # source devel space of underlay
catkin_make -DCMAKE_BUILD_TYPE=Release
# build install space of underlay
catkin_make -DCMAKE_BUILD_TYPE=Release install > /dev/null #2>&1
ret=$?
kill %%
exit $ret