-
Notifications
You must be signed in to change notification settings - Fork 41
/
.travis.script.sh
30 lines (28 loc) · 1.2 KB
/
.travis.script.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
set -e
set -v
while true; do echo "SCRIPT IS RUNNING" && sleep 60; done&
# create empty overlay workspace
mkdir -p $CATKIN_WS_SRC
source $CATKIN_WS_UNDERLAY/install/setup.bash > /dev/null 2>&1 # source install space of underlay
catkin_init_workspace $CATKIN_WS_SRC
cd $CATKIN_WS
catkin_make -DCMAKE_BUILD_TYPE=Release # build empty overlay
# populate overlay
ln -s $TRAVIS_BUILD_DIR $CATKIN_WS_SRC
# install dependencies from overlay
rosdep install -q --from-paths $CATKIN_WS_SRC -i -y --rosdistro $CI_ROS_DISTRO > /dev/null #2>&1
# build overlay
source $CATKIN_WS/devel/setup.bash > /dev/null 2>&1 # source devel space of overlay
catkin_make -DCMAKE_BUILD_TYPE=Release
catkin_make -DCMAKE_BUILD_TYPE=Release install > /dev/null
# source $CATKIN_WS/install/setup.bash > /dev/null 2>&1 # source install space of overlay for testing TODO: the current catkin implementation does not allow to test in install space
if [ "$CATKIN_ENABLE_TESTING" == "OFF" ]; then
echo "Testing disabled"
else
mkdir -p $CATKIN_WS/build/test_results # create test_results directory to prevent concurrent tests to fail create it
catkin_make run_tests $CATKIN_TEST_ARGUMENTS # test overlay
fi
catkin_test_results --verbose
ret=$?
kill %%
exit $ret