forked from PX4/PX4-SITL_gazebo-classic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
92 lines (88 loc) · 3.05 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
env:
global:
- CCACHE_DIR=$HOME/.ccache
- CMAKE_BUILD="mkdir Build; cd Build; cmake ..; make -j$(nproc) -l$(nproc)"
- CATKIN_BUILD="mkdir -p ~/catkin_ws/src; cd ~/catkin_ws; catkin init; ln -s ${TRAVIS_BUILD_DIR} src; catkin build -j$(nproc) -l$(nproc) -DBUILD_ROS_INTERFACE=ON"
- KINETIC="source /opt/ros/kinetic/setup.bash; ${CATKIN_BUILD}"
- MELODIC="source /opt/ros/melodic/setup.bash; ${CATKIN_BUILD}"
matrix:
include:
- name: CMake build (Gazebo 9)
os: linux
language: cpp
services:
- docker
cache:
ccache: true
env:
- PX4_DOCKER_REPO=px4io/px4-dev-simulation:2018-11-22
- BUILD=${CMAKE_BUILD}
- name: Catkin build on Ubuntu 16.04 with ROS Kinetic (Gazebo 7)
os: linux
language: cpp
services:
- docker
cache:
ccache: true
env:
- PX4_DOCKER_REPO=px4io/px4-dev-ros-kinetic:2018-11-22
- BUILD=${KINETIC}
- name: Catkin build on Ubuntu 18.04 with ROS Melodic (Gazebo 9)
os: linux
language: cpp
services:
- docker
cache:
ccache: true
env:
- PX4_DOCKER_REPO=px4io/px4-dev-ros:2018-11-22
- BUILD=${MELODIC}
- name: Validate SDF schemas
os: linux
language: cpp
services:
- docker
cache:
ccache: true
env:
- PX4_DOCKER_REPO=px4io/px4-dev-simulation:2018-11-22
- BUILD="source ./scripts/validate_sdf.bash"
- name: MacOSX 10.13 build with Gazebo8
os: osx
osx_image: xcode10
language: cpp
cache:
ccache: true
env:
- GAZEBO_VERSION="gazebo8"
- name: MacOSX 10.13 build with Gazebo9
os: osx
osx_image: xcode10
language: cpp
cache:
ccache: true
env:
- GAZEBO_VERSION="gazebo9"
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
git clone --depth 1 https://github.com/mavlink/c_library_v2.git /usr/local/include/mavlink/v2.0;
rm -rf /usr/local/include/mavlink/v2.0/.git;
fi
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew tap PX4/px4;
brew install px4-dev;
brew tap osrf/simulation;
brew install opencv ${GAZEBO_VERSION};
brew link --overwrite numpy;
brew cask reinstall xquartz java;
sudo -H pip2 install --upgrade pip setuptools;
sudo -H pip2 install rospkg pyserial empy toml numpy pandas jinja2;
fi
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
mkdir Build;
cd Build && cmake .. && make -j$(sysctl -n hw.physicalcpu) -l$(sysctl -n hw.physicalcpu);
else docker run -it --rm -w ${TRAVIS_BUILD_DIR} --env=CCACHE_DIR="${CCACHE_DIR}" --env=LOCAL_USER_ID="$(id -u)" --volume=${CCACHE_DIR}:${CCACHE_DIR}:rw --volume=${TRAVIS_BUILD_DIR}:${TRAVIS_BUILD_DIR}:rw ${PX4_DOCKER_REPO} /bin/bash -e -c "${BUILD}";
fi