forked from autowarefoundation/autoware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
119 lines (114 loc) · 4.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
language:
- generic
cache:
- apt
matrix:
include:
- dist: xenial
compiler: gcc
os: linux
sudo: required
env: ROS_DISTRO=kinetic
- dist: xenial
os: linux
sudo: required
services:
- docker
env: ROS_DISTRO=kinetic CROSS_COMPILE=1
- dist: trusty
compiler: gcc
os: linux
sudo: required
env: ROS_DISTRO=indigo
notifications:
slack: star4:911NA0lU8gDHitCKLto9LzPJ
env:
global:
- ROS_CI_DESKTOP="`lsb_release -cs`"
- CI_SOURCE_PATH=$(pwd)
- ROSINSTALL_FILE=$CI_SOURCE_PATH/dependencies.rosinstall
- CATKIN_OPTIONS=$CI_SOURCE_PATH/catkin.options
- PYTHONPATH=${PYTHONPATH}:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages
# Install system dependencies, and Autoware pre requisites (non-ros)
before_install:
- if [ "${CROSS_COMPILE}" != "1" ]; then
sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list";
travis_retry sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116;
travis_retry sudo apt-get update;
travis_retry sudo apt-get install -y dpkg;
travis_retry sudo apt-get install -y python-catkin-pkg python-rosdep python-wstool ros-${ROS_DISTRO}-catkin;
source /opt/ros/${ROS_DISTRO}/setup.bash;
travis_retry sudo rosdep init;
travis_retry rosdep update;
fi
# Install all ros dependencies, using wstool first and rosdep second.
# wstool looks for a ROSINSTALL_FILE defined in the environment variables.
before_script:
- if [ "${CROSS_COMPILE}" != "1" ]; then
cd ros/src;
wstool init;
test -f "${ROSINSTALL_FILE}" && wstool merge "${ROSINSTALL_FILE}";
travis_retry wstool up;
cd ..;
travis_retry rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO};
fi
# Compile and test (mark the build as failed if any step fails). If the
# CATKIN_OPTIONS file exists, use it as an argument to catkin_make, for example
# to blacklist certain packages.
#
# NOTE on testing: `catkin_make run_tests` will show the output of the tests
# (gtest, nosetest, etc..) but always returns 0 (success) even if a test
# fails. Running `catkin_test_results` aggregates all the results and returns
# non-zero when a test fails (which notifies Travis the build failed).
script:
- if [ "${CROSS_COMPILE}" == "1" ]; then
AUTOWARE_HOME=${TRAVIS_BUILD_DIR};
AUTOWARE_TARGET_ARCH=aarch64;
AUTOWARE_TARGET_PLATFORM=generic-aarch64;
AUTOWARE_BUILD_PATH=${AUTOWARE_HOME}/ros/build-${AUTOWARE_TARGET_PLATFORM};
AUTOWARE_DEVEL_PATH=${AUTOWARE_HOME}/ros/devel-${AUTOWARE_TARGET_PLATFORM};
AUTOWARE_TOOLCHAIN_FILE_PATH=${AUTOWARE_HOME}/ros/cross_toolchain.cmake;
AUTOWARE_SYSROOT=/sysroot/${AUTOWARE_TARGET_PLATFORM};
travis_retry docker run
-e AUTOWARE_SYSROOT=${AUTOWARE_SYSROOT}
--rm
-v ${AUTOWARE_HOME}:${AUTOWARE_HOME}
-w ${AUTOWARE_HOME}/ros
autoware/build:${AUTOWARE_TARGET_PLATFORM}-kinetic-20180809
bash
-c "source /opt/ros/kinetic/setup.bash &&
catkin_make
-DCMAKE_TOOLCHAIN_FILE=${AUTOWARE_TOOLCHAIN_FILE_PATH}
-DCATKIN_DEVEL_PREFIX=${AUTOWARE_DEVEL_PATH}
-DCMAKE_SYSTEM_PROCESSOR=${AUTOWARE_TARGET_ARCH}
--build ${AUTOWARE_BUILD_PATH}
clean &&
source devel-${AUTOWARE_TARGET_PLATFORM}/setup.bash &&
catkin_make
-DCMAKE_TOOLCHAIN_FILE=${AUTOWARE_TOOLCHAIN_FILE_PATH}
-DCATKIN_DEVEL_PREFIX=${AUTOWARE_DEVEL_PATH}
-DCMAKE_SYSTEM_PROCESSOR=${AUTOWARE_TARGET_ARCH}
--build ${AUTOWARE_BUILD_PATH}
-j4";
else
catkin_make clean;
source devel/setup.bash;
catkin_make -j4;
fi
#sudo: required
#dist: trusty
#language: generic
#compiler:
# - gcc
#notifications:
# slack: star4:911NA0lU8gDHitCKLto9LzPJ
#env:
# matrix:
# - USE_DEB=true ROS_DISTRO="indigo" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
## - USE_DEB=true ROS_DISTRO="indigo" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
# - USE_DEB=true ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
## - USE_DEB=true ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
#install:
# - git clone https://github.com/ros-industrial/industrial_ci.git .ci_config
#script:
# - source .ci_config/travis.sh