-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
58 lines (51 loc) · 1.86 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
os: linux
dist: bionic
language: generic
compiler:
- gcc
env:
global:
- CATKIN_WS=~/catkin_ws
- CATKIN_WS_SRC=${CATKIN_WS}/src
- CI_ROS_DISTRO="melodic"
- PKG_SRC=${CATKIN_WS_SRC}/jps_global_planner
before_install:
# Add ROS key
- sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros-latest.list'
- wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
# Prepare rosdep to install dependencies
- sudo apt-get update -qq
- sudo apt-get install -y python-rosdep python-catkin-tools
- sudo rosdep init
- rosdep update
# Install ROS
- sudo apt-get install -y ros-${CI_ROS_DISTRO}-ros-base
install:
# Create workspace
- mkdir -p $CATKIN_WS_SRC
# Add ONLY the package under integration to the workspace using a symlink
- ln -s $TRAVIS_BUILD_DIR $PKG_SRC
# Install all dependencies using rosdep
before_script:
# Install jps3d
- sudo apt install -y libeigen3-dev libyaml-cpp-dev libboost-dev cmake
- git clone https://github.com/KumarRobotics/jps3d.git /tmp/jps3d
- mkdir -p /tmp/jps3d/build && cd /tmp/jps3d/build && cmake .. && make -j$(nproc)
- sudo make install
- sudo ldconfig
# Use rosdep to install all dependencies (including ROS itself)
- cd $CATKIN_WS
- source /opt/ros/$CI_ROS_DISTRO/setup.bash
- rosdep install --from-paths ./ -i -y --rosdistro $CI_ROS_DISTRO --skip-keys=jps3d
# Compile and test
script:
- cd $CATKIN_WS
# Build packages
- catkin_make -DCMAKE_BUILD_TYPE=Release -j$(nproc)
- source devel/setup.bash
# Run tests
- rosrun jps_global_planner jps_global_planner_test `rospack find jps_global_planner`/test/data/corridor.yaml
# Lint package files
- sudo apt-get install -y python-catkin-lint
- catkin lint -W2 --strict --explain $PKG_SRC --ignore plugin_missing_install
- cd $CATKIN_WS/build/jps_global_planner && make roslint