Skip to content

Commit 47b3cc0

Browse files
committed
Set up CI with Azure Pipelines
1 parent 8714bd8 commit 47b3cc0

6 files changed

Lines changed: 69 additions & 66 deletions

File tree

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ Build status
66

77
| Target | Status |
88
|----------|--------|
9-
| **Ubuntu Xenial (OpenJDK)** | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/esteve/ros2_java/branches/master/1)](https://travis-ci.org/esteve/ros2_java) |
10-
| **Ubuntu Xenial (Android)** | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/esteve/ros2_java/branches/master/2)](https://travis-ci.org/esteve/ros2_java) |
11-
| **Windows Desktop (JDK)** | [![Build status](https://ci.appveyor.com/api/projects/status/7syqscd42yd3f7do?svg=true)](https://ci.appveyor.com/project/esteve/ros2-java) |
9+
| **Ubuntu Xenial (OpenJDK)** | [![Build Status](http://vsts-matrix-badges.herokuapp.com/repos/ros2-java/ros2-java/1/branches/master/1)](https://travis-ci.org/esteve/ros2_java) |
10+
| **Ubuntu Xenial (Android)** | [![Build Status](http://vsts-matrix-badges.herokuapp.com/repos/ros2-java/ros2-java/1/branches/master/2)](https://travis-ci.org/esteve/ros2_java) |
1211

1312
Introduction
1413
------------

azure-pipelines.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
pool:
2+
vmImage: 'Ubuntu 16.04'
3+
4+
strategy:
5+
matrix:
6+
xenial_android:
7+
ubuntu_distro: 'xenial'
8+
ros2_java_branch: 'azure-pipelines'
9+
docker_tag: 'android'
10+
script_path: 'build_android.sh'
11+
xenial_java:
12+
ubuntu_distro: 'xenial'
13+
ros2_java_branch: 'azure-pipelines'
14+
docker_tag: 'java'
15+
script_path: 'build_java.sh'
16+
maxParallel: 2
17+
18+
steps:
19+
- script: |
20+
docker run -v $BUILD_SOURCESDIRECTORY/ci-scripts:/ci-scripts -e ROS2_JAVA_DIR=${AGENT_BUILDDIRECTORY}/ros2_java_build -e ROS2_JAVA_CI=1 -e ROS2_JAVA_BRANCH=$ROS2_JAVA_BRANCH -i --rm esteve/ros2-ubuntu-$UBUNTU_DISTRO-travisci:$DOCKER_TAG sh /ci-scripts/$SCRIPT_PATH
21+
displayName: 'Build for $(ubuntu_distro) / $(docker_tag)'

ci-scripts/build_android.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ANDROID_ABI=armeabi-v7a
1010
ANDROID_NDK=/opt/android/${ANDROID_NDK_VERSION}/
1111

1212
ROS2_CURDIR=${PWD}
13-
ROS2_JAVA_DIR=$(test -n "${TRAVIS}" && echo /home/travis/build || echo ${ROS2_CURDIR})
13+
ROS2_JAVA_DIR=${ROS2_JAVA_DIR:-${ROS2_CURDIR}}
1414
ROS2_OUTPUT_DIR=${ROS2_JAVA_DIR}/output
1515
AMENT_WS=${ROS2_JAVA_DIR}/ament_ws
1616
ROS2_ANDROID_WS=${ROS2_JAVA_DIR}/ros2_android_ws
@@ -30,7 +30,7 @@ mkdir -p ${ROS2_JAVA_DIR}
3030
mkdir -p ${AMENT_WS}/src
3131
mkdir -p ${ROS2_ANDROID_WS}/src
3232

33-
if [ -n "${TRAVIS}" ]; then
33+
if [ -n "${ROS2_JAVA_CI}" ]; then
3434
wget -O /tmp/android-ndk.zip https://dl.google.com/android/repository/${ANDROID_NDK_VERSION}-linux-x86_64.zip && mkdir -p /opt/android/ && cd /opt/android/ && unzip -q /tmp/android-ndk.zip && rm /tmp/android-ndk.zip
3535
wget -O /tmp/android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_VERSION}.zip && mkdir -p /opt/android/android-sdk-linux && cd /opt/android/android-sdk-linux && unzip -q /tmp/android-sdk.zip && rm /tmp/android-sdk.zip
3636

ci-scripts/build_java.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33

44
ROS2_CURDIR=$PWD
5-
ROS2_JAVA_DIR=$(test -n "$TRAVIS" && echo /home/travis/build || echo $ROS2_CURDIR)
5+
ROS2_JAVA_DIR=${ROS2_JAVA_DIR:-${ROS2_CURDIR}}
66
ROS2_OUTPUT_DIR=$ROS2_JAVA_DIR/output
77
AMENT_WS=$ROS2_JAVA_DIR/ament_ws
88
ROS2_JAVA_WS=$ROS2_JAVA_DIR/ros2_java_ws
@@ -35,21 +35,16 @@ if [ -z "$ROS2_JAVA_SKIP_FETCH" ]; then
3535
vcs export --exact
3636

3737
cd $ROS2_JAVA_WS
38-
if [ -z "$TRAVIS" ]; then
39-
wget https://raw.githubusercontent.com/esteve/ros2_java/$ROS2_JAVA_BRANCH/ros2_java_desktop.repos || wget https://raw.githubusercontent.com/esteve/ros2_java/master/ros2_java_desktop.repos
40-
vcs import $ROS2_JAVA_WS/src < ros2_java_desktop.repos
41-
else
42-
wget https://raw.githubusercontent.com/esteve/ros2_java/$ROS2_JAVA_BRANCH/ros2_java_desktop_travis.repos || wget https://raw.githubusercontent.com/esteve/ros2_java/master/ros2_java_desktop_travis.repos
43-
vcs import $ROS2_JAVA_WS/src < ros2_java_desktop_travis.repos
44-
fi
38+
wget https://raw.githubusercontent.com/esteve/ros2_java/$ROS2_JAVA_BRANCH/ros2_java_desktop.repos || wget https://raw.githubusercontent.com/esteve/ros2_java/master/ros2_java_desktop.repos
39+
vcs import $ROS2_JAVA_WS/src < ros2_java_desktop.repos
4540
cd src/ros2_java
4641
vcs custom --git --args checkout $ROS2_JAVA_BRANCH || true
4742
cd $ROS2_JAVA_WS
4843
vcs export --exact
4944
cd src/ros2
5045
# vcs custom --git --args rebase origin/master || true
5146

52-
if [ -n "$TRAVIS" ]; then
47+
if [ -n "${ROS2_JAVA_CI}" ]; then
5348
find $ROS2_JAVA_WS/src/ros2/examples/rclcpp $ROS2_JAVA_WS/src/ros2/examples/rclpy -name "package.xml" -printf "%h\n" | xargs -i touch {}/AMENT_IGNORE
5449
fi
5550
fi

ros2_java_desktop.repos

Lines changed: 4 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ repositories:
1111
type: git
1212
url: https://github.com/ros/class_loader.git
1313
version: 1.1.0
14+
ros/console_bridge:
15+
type: git
16+
url: https://github.com/ros/console_bridge.git
17+
version: ad25f7307da76be2857545e7e5c2a20727eee542
1418
ros2/console_bridge_vendor:
1519
type: git
1620
url: https://github.com/ros2/console_bridge_vendor.git
@@ -27,22 +31,10 @@ repositories:
2731
type: git
2832
url: https://github.com/ros2/common_interfaces.git
2933
version: 0.5.0
30-
ros2/demos:
31-
type: git
32-
url: https://github.com/ros2/demos.git
33-
version: 0.5.1
34-
ros2/examples:
35-
type: git
36-
url: https://github.com/ros2/examples.git
37-
version: 0.5.1
3834
ros2/example_interfaces:
3935
type: git
4036
url: https://github.com/ros2/example_interfaces.git
4137
version: 0.5.0
42-
ros2/geometry2:
43-
type: git
44-
url: https://github.com/ros2/geometry2.git
45-
version: 0.9.1
4638
ros2/launch:
4739
type: git
4840
url: https://github.com/ros2/launch.git
@@ -63,34 +55,14 @@ repositories:
6355
type: git
6456
url: https://github.com/ros2/rcl_interfaces.git
6557
version: master
66-
# ros2/rclc:
67-
# type: git
68-
# url: https://github.com/ros2/rclc.git
69-
# version: master
70-
ros2/rclcpp:
71-
type: git
72-
url: https://github.com/ros2/rclcpp.git
73-
version: 0.5.1
7458
ros2/rclpy:
7559
type: git
7660
url: https://github.com/ros2/rclpy.git
7761
version: 0.5.3
78-
ros2/realtime_support:
79-
type: git
80-
url: https://github.com/ros2/realtime_support.git
81-
version: 0.5.0
8262
ros2/rmw:
8363
type: git
8464
url: https://github.com/ros2/rmw.git
8565
version: 0.5.0
86-
ros2/rmw_connext:
87-
type: git
88-
url: https://github.com/ros2/rmw_connext.git
89-
version: 0.5.1
90-
ros2/rosidl_typesupport_connext:
91-
type: git
92-
url: https://github.com/ros2/rosidl_typesupport_connext.git
93-
version: 0.5.3
9466
ros2/rmw_fastrtps:
9567
type: git
9668
url: https://github.com/ros2/rmw_fastrtps.git
@@ -107,10 +79,6 @@ repositories:
10779
type: git
10880
url: https://github.com/ros2/rosidl_typesupport_opensplice.git
10981
version: 0.5.0
110-
ros2/ros1_bridge:
111-
type: git
112-
url: https://github.com/ros2/ros1_bridge.git
113-
version: 0.5.0
11482
ros2/ros2cli:
11583
type: git
11684
url: https://github.com/ros2/ros2cli.git
@@ -135,18 +103,6 @@ repositories:
135103
type: git
136104
url: https://github.com/ros2/rosidl_typesupport.git
137105
version: 0.5.0
138-
ros2/system_tests:
139-
type: git
140-
url: https://github.com/ros2/system_tests.git
141-
version: 29c299669a766329dffcc91f459b17c0e1c46c15
142-
ros2/tinyxml_vendor:
143-
type: git
144-
url: https://github.com/ros2/tinyxml_vendor.git
145-
version: 0.5.0
146-
ros2/tlsf:
147-
type: git
148-
url: https://github.com/ros2/tlsf.git
149-
version: 0.5.0
150106
ros2_java/ros2_java:
151107
type: git
152108
url: https://github.com/esteve/ros2_java.git

ros2_java_desktop_travis.repos

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ repositories:
77
type: git
88
url: https://github.com/eProsima/Fast-RTPS.git
99
version: 7a0b0fe7ca8d2c4ea41e36744c6024c263a6505a
10+
ros/class_loader:
11+
type: git
12+
url: https://github.com/ros/class_loader.git
13+
version: 1.1.0
14+
ros/console_bridge:
15+
type: git
16+
url: https://github.com/ros/console_bridge.git
17+
version: ad25f7307da76be2857545e7e5c2a20727eee542
18+
ros2/console_bridge_vendor:
19+
type: git
20+
url: https://github.com/ros2/console_bridge_vendor.git
21+
version: master
1022
ros2/ament_cmake_ros:
1123
type: git
1224
url: https://github.com/ros2/ament_cmake_ros.git
@@ -23,6 +35,10 @@ repositories:
2335
type: git
2436
url: https://github.com/ros2/example_interfaces.git
2537
version: 0.5.0
38+
ros2/launch:
39+
type: git
40+
url: https://github.com/ros2/launch.git
41+
version: 0.5.2
2642
ros2/libyaml_vendor:
2743
type: git
2844
url: https://github.com/ros2/libyaml_vendor.git
@@ -39,6 +55,10 @@ repositories:
3955
type: git
4056
url: https://github.com/ros2/rcl_interfaces.git
4157
version: master
58+
ros2/rclpy:
59+
type: git
60+
url: https://github.com/ros2/rclpy.git
61+
version: 0.5.3
4262
ros2/rmw:
4363
type: git
4464
url: https://github.com/ros2/rmw.git
@@ -51,6 +71,18 @@ repositories:
5171
type: git
5272
url: https://github.com/ros2/rmw_implementation.git
5373
version: 0.5.1
74+
ros2/rmw_opensplice:
75+
type: git
76+
url: https://github.com/ros2/rmw_opensplice.git
77+
version: 0.5.2
78+
ros2/rosidl_typesupport_opensplice:
79+
type: git
80+
url: https://github.com/ros2/rosidl_typesupport_opensplice.git
81+
version: 0.5.0
82+
ros2/ros2cli:
83+
type: git
84+
url: https://github.com/ros2/ros2cli.git
85+
version: 0.5.3
5486
ros2/rosidl:
5587
type: git
5688
url: https://github.com/ros2/rosidl.git
@@ -63,14 +95,14 @@ repositories:
6395
type: git
6496
url: https://github.com/ros2/rosidl_defaults.git
6597
version: 0.5.0
98+
ros2/rosidl_python:
99+
type: git
100+
url: https://github.com/ros2/rosidl_python.git
101+
version: 0.5.2
66102
ros2/rosidl_typesupport:
67103
type: git
68104
url: https://github.com/ros2/rosidl_typesupport.git
69105
version: 0.5.0
70-
ros2/tinyxml_vendor:
71-
type: git
72-
url: https://github.com/ros2/tinyxml_vendor.git
73-
version: 0.5.0
74106
ros2_java/ros2_java:
75107
type: git
76108
url: https://github.com/esteve/ros2_java.git

0 commit comments

Comments
 (0)