forked from eborghi10/create_autonomy
-
-
Notifications
You must be signed in to change notification settings - Fork 38
/
.travis.yml
71 lines (65 loc) · 2.55 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
os: linux
dist: bionic
language: generic
compiler:
- gcc
env:
global:
- CATKIN_WS=~/catkin_ws
- CATKIN_WS_SRC=${CATKIN_WS}/src
- CI_ROS_DISTRO="melodic"
- CREATE_AUTONOMY_SRC=${CATKIN_WS_SRC}/create_autonomy
install:
- sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros-latest.list'
- sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" > /etc/apt/sources.list.d/gazebo-stable.list'
- wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
- wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
- sudo apt-get update -qq
- sudo apt-get install -qq -y libqt4-dev python-catkin-tools python-rosdep python3-vcstool wget
# Install RTIMULib
- bash ${TRAVIS_BUILD_DIR}/sensors/ca_imu/scripts/install_rtimulib.sh
# Install dependencies
- sudo rosdep init
- rosdep update
# Install ROS base
- sudo apt-get install -y ros-${CI_ROS_DISTRO}-ros-base
# Install jps3d
- sudo apt-get install -y libeigen3-dev libyaml-cpp-dev libboost-dev
- 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
# Create workspace
- mkdir -p $CREATE_AUTONOMY_SRC
# Clone manual dependencies to $CATKIN_WS_SRC
- wget -q https://raw.githubusercontent.com/${TRAVIS_REPO_SLUG}/${TRAVIS_COMMIT}/dependencies.repos
- /usr/bin/vcs import $CATKIN_WS_SRC < dependencies.repos
# Add ONLY the package under integration to the workspace using a symlink
- ln -s $TRAVIS_BUILD_DIR $CREATE_AUTONOMY_SRC
# Use rosdep to install all dependencies (including ROS itself)
- cd $CATKIN_WS
- rosdep install --from-paths ./ -i -y --rosdistro $CI_ROS_DISTRO
# Build packages
before_script:
- source /opt/ros/${CI_ROS_DISTRO}/setup.bash
- catkin_make -DCMAKE_BUILD_TYPE=Release -j$(nproc)
script:
- source devel/setup.bash
# Run tests
# NOTE: GAZEBO TESTS FAIL IN PARALLEL
- catkin_make run_tests -j1 && catkin_test_results
# Lint package files ONLY for create_autonomy
- sudo apt-get install -y python-catkin-lint
- catkin lint -W2 --strict --explain $CREATE_AUTONOMY_SRC
# Tips
#
# C++:
# ----
# sudo apt-get install astyle
# find -regextype egrep -regex '.*\.[ch](pp)?$' -exec astyle '{}' --style=allman --indent=spaces=2 --pad-oper --unpad-paren --pad-header --convert-tabs \;
#
# Python:
# -------
# sudo pip install pep8ify
# pep8ify -nw .
- catkin_make roslint