forked from PX4/px4_ros_com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
118 lines (115 loc) · 5.66 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
sudo: required
env:
global:
- CCACHE_DIR=${HOME}/.ccache
- PX4_FIRMWARE=https://github.com/PX4/Firmware.git
- PX4_MSGS=https://github.com/PX4/px4_msgs.git
- BUILD_PX4_FIRMWARE_RTPS="git clone ${PX4_FIRMWARE}; cd Firmware; make px4_sitl_rtps; cd $pwd;"
matrix:
include:
- name: Build on ROS2 Ardent
os: linux
language: cpp
services:
- docker
cache:
ccache: true
env:
- ROS2_DISTRO=ardent
- ROS2_ENV_PATH=/opt/ros/${ROS2_DISTRO}/setup.bash
- WS_SETUP="unset ROS_DISTRO; mkdir -p ~/colcon_ws/src; cd ~/colcon_ws; ln -s ${TRAVIS_BUILD_DIR} src/px4_ros_com; git clone ${PX4_MSGS} -b master; cd src/px4_ros_com/scripts;"
- COLCON_BUILD="./build_ros2_workspace.bash"
- BUILD_ARGS="--no_ros1_bridge --ros_distro ${ROS2_DISTRO} --ros_path ${ROS2_ENV_PATH}"
- DOCKER_CONTAINER=px4io/px4-dev-ros2-ardent:2019-10-24
- name: Build on ROS2 Bouncy
os: linux
language: cpp
services:
- docker
cache:
ccache: true
env:
- ROS2_DISTRO=bouncy
- ROS2_ENV_PATH=/opt/ros/${ROS2_DISTRO}/setup.bash
- WS_SETUP="unset ROS_DISTRO; mkdir -p ~/colcon_ws/src; cd ~/colcon_ws; ln -s ${TRAVIS_BUILD_DIR} src/px4_ros_com; git clone ${PX4_MSGS} -b master; cd src/px4_ros_com/scripts;"
- COLCON_BUILD="./build_ros2_workspace.bash"
- BUILD_ARGS="--no_ros1_bridge --ros_distro ${ROS2_DISTRO} --ros_path ${ROS2_ENV_PATH}"
- DOCKER_CONTAINER=px4io/px4-dev-ros2-bouncy:2019-10-24
- name: Build on ROS2 Crystal
os: linux
language: cpp
services:
- docker
cache:
ccache: true
env:
- ROS2_DISTRO=crystal
- ROS2_ENV_PATH=/opt/ros/${ROS2_DISTRO}/setup.bash
- BUILD_ARGS="--no_ros1_bridge --ros_distro ${ROS2_DISTRO} --ros_path ${ROS2_ENV_PATH}"
- COLCON_BUILD="./build_ros2_workspace.bash"
- WS_SETUP="unset ROS_DISTRO; mkdir -p ~/colcon_ws/src; cd ~/colcon_ws; ln -s ${TRAVIS_BUILD_DIR} src/px4_ros_com; git clone ${PX4_MSGS} -b master; cd src/px4_ros_com/scripts;"
- DOCKER_CONTAINER=px4io/px4-dev-ros2-crystal:2019-10-24
# - name: Build full pipeline (px4_ros_com + ros1_bridge) on ROS2 Crystal
# os: linux
# language: cpp
# services:
# - docker
# cache:
# ccache: true
# env:
# - ROS2_DISTRO=crystal
# - ROS2_ENV_PATH=/opt/ros/${ROS2_DISTRO}/setup.bash
# - FULL_BUILD="ON"
# - BUILD_ARGS="--ros1_ws_dir ~/colcon1_ws --ros_distro ${ROS2_DISTRO} --ros_path ${ROS2_ENV_PATH}"
# - COLCON_BUILD="./build_all_ci.bash"
# - WS_SETUP="unset ROS_DISTRO; mkdir -p ~/colcon1_ws/src; cd ~/colcon1_ws; ln -s ${TRAVIS_BUILD_DIR} src/px4_ros_com; git clone ${PX4_MSGS} -b ros1; cd src/px4_ros_com; git checkout ros1; cd $pwd; mkdir -p ~/colcon2_ws/src; cd ~/colcon2_ws; ln -s ${TRAVIS_BUILD_DIR} src/px4_ros_com; git clone ${PX4_MSGS} -b master; cd src/px4_ros_com/scripts;"
# - DOCKER_CONTAINER=px4io/px4-dev-ros2-crystal:2019-10-24
- name: Build on ROS2 Dashing
os: linux
language: cpp
services:
- docker
cache:
ccache: true
env:
- ROS2_DISTRO=dashing
- ROS2_ENV_PATH=/opt/ros/${ROS2_DISTRO}/setup.bash
- BUILD_ARGS="--no_ros1_bridge --ros_distro ${ROS2_DISTRO} --ros_path ${ROS2_ENV_PATH}"
- COLCON_BUILD="./build_ros2_workspace.bash"
- WS_SETUP="unset ROS_DISTRO; mkdir -p ~/colcon_ws/src; cd ~/colcon_ws; ln -s ${TRAVIS_BUILD_DIR} src/px4_ros_com; git clone ${PX4_MSGS} -b master; cd src/px4_ros_com/scripts;"
- DOCKER_CONTAINER=px4io/px4-dev-ros2-dashing:2019-10-24
- name: Build on ROS2 Eloquent
os: linux
language: cpp
services:
- docker
cache:
ccache: true
env:
- ROS2_DISTRO=eloquent
- ROS2_ENV_PATH=/opt/ros/${ROS2_DISTRO}/setup.bash
- BUILD_ARGS="--no_ros1_bridge --ros_distro ${ROS2_DISTRO} --ros_path ${ROS2_ENV_PATH}"
- COLCON_BUILD="./build_ros2_workspace.bash"
- WS_SETUP="unset ROS_DISTRO; mkdir -p ~/colcon_ws/src; cd ~/colcon_ws; ln -s ${TRAVIS_BUILD_DIR} src/px4_ros_com; git clone ${PX4_MSGS} -b master; cd src/px4_ros_com/scripts;"
- DOCKER_CONTAINER=px4io/px4-dev-ros2-eloquent:2019-10-24
script:
- if [[ $TRAVIS_BRANCH =~ "master" ]] || [[ $TRAVIS_BRANCH =~ "ros2" ]] || [[ ! "$TRAVIS_BRANCH" =~ "ros1" ]]; then
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
${DOCKER_CONTAINER} /bin/bash -c "${BUILD_PX4_FIRMWARE_RTPS} ${WS_SETUP} ${COLCON_BUILD} ${BUILD_ARGS}";
fi
# CI runs over all branches containing 'master' or 'ros2' on the name or that do not contain 'ros1' in the name
# if [[ $FULL_BUILD == "ON"]]; then
# docker run -it --name px4ros -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
# ${DOCKER_CONTAINER} /bin/bash -c "${BUILD_PX4_FIRMWARE_RTPS} ${WS_SETUP} ${COLCON_BUILD} ${BUILD_ARGS}"
# docker exec -it -w ${TRAVIS_BUILD_DIR} px4ros /bin/bash ${TRAVIS_BUILD_DIR}/scripts/full_build_components/build_ros1.bash
# docker exec -it -w ${TRAVIS_BUILD_DIR} px4ros /bin/bash ${TRAVIS_BUILD_DIR}/scripts/full_build_components/build_ros1_bridge.bash
# docker exec -it -w ${TRAVIS_BUILD_DIR} px4ros /bin/bash ${TRAVIS_BUILD_DIR}/scripts/full_build_components/config_agent.bash
# else