-
Notifications
You must be signed in to change notification settings - Fork 30
166 lines (141 loc) · 6.3 KB
/
ci.yml
File metadata and controls
166 lines (141 loc) · 6.3 KB
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: CI for eProsima Integration Service
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '**.md'
- 'examples/basic/*'
- 'examples/wan_tunneling/*'
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- '**.md'
- 'examples/basic/*'
- 'examples/wan_tunneling/*'
- 'docs/**'
schedule:
- cron: '0 0 * * 0'
jobs:
integration-service_CI:
strategy:
fail-fast: false
matrix:
node: [foxy, galactic, humble]
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
node: humble
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
path: src/integration-service
- name: Download required dependencies
run: |
sudo apt update
DEBIAN_FRONTEND=noninteractive sudo apt install -y curl git libboost-dev libboost-program-options-dev \
libyaml-cpp-dev libwebsocketpp-dev libssl-dev libcurlpp-dev libasio-dev libcurl4-openssl-dev
- name: Download and install ROS 1 Noetic
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
# Note there are not Noetic binaries for jammy
echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" \
| sudo tee /etc/apt/sources.list.d/ros-latest.list > /dev/null
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt update && sudo apt install -y ros-noetic-ros-base
- name: Download and install ROS 2 ${{ matrix.node }}
run: |
sudo apt install -y libboost-system-dev software-properties-common
sudo add-apt-repository -y universe
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key \
-o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg]" \
"http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" \
| sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update && sudo apt install -y python3-colcon-common-extensions python3-colcon-mixin python3-vcstool \
ros-${{ matrix.node }}-fastrtps ros-${{ matrix.node }}-rmw-fastrtps-cpp \
ros-${{ matrix.node }}-rclcpp ros-${{ matrix.node }}-nav-msgs ros-${{ matrix.node }}-geometry-msgs \
ros-${{ matrix.node }}-ros2pkg
- name: Check ROS 2 installation
run: |
. /opt/ros/${{ matrix.node }}/setup.sh
ros2 pkg list
- name: Download the Integration Service Fast DDS SystemHandle
run: |
git clone https://github.com/eProsima/FastDDS-SH.git src/fastdds-sh
- name: Download the Integration Service ROS 1 SystemHandle
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
git clone https://github.com/eProsima/ROS1-SH.git src/ros1-sh
- name: Download the Integration Service ROS 2 SystemHandle
run: |
git clone https://github.com/eProsima/ROS2-SH.git src/ros2-sh
- name: Download the Integration Service WebSocket SystemHandle
run: |
git clone https://github.com/eProsima/WebSocket-SH.git src/websocket-sh
- name: Download the Integration Service FIWARE SystemHandle
run: |
git clone https://github.com/eProsima/FIWARE-SH.git src/fiware-sh
- name: Install ROS 1 example_interfaces package
if: ${{ matrix.os == 'ubuntu-20.04' }}
working-directory: ./src/integration-service/examples/utils/ros1/catkin_ws
run: |
. /opt/ros/noetic/setup.sh
catkin_make --pkg example_interfaces -DBUILD_EXAMPLES=ON -DCMAKE_INSTALL_PREFIX=/opt/ros/noetic install
catkin_make --pkg add_two_ints_server -DBUILD_EXAMPLES=ON -DCMAKE_INSTALL_PREFIX=/opt/ros/noetic install
- name: Build under ROS1 overlay
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
. /opt/ros/noetic/setup.sh
colcon build --event-handler=console_direct+ \
--packages-up-to-regex is-ros1 \
--cmake-args -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON
- name: Build under ROS2 overlay
run: |
. /opt/ros/${{ matrix.node }}/setup.sh
colcon build --event-handler=console_direct+ \
--packages-skip-regex is-ros1 \
--cmake-args -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON
- name: Test the Integration Service Core
run: |
colcon test --packages-select is-core --event-handlers console_direct+
colcon test-result
- name: Test the Integration Service Fast DDS SystemHandle
run: |
. /opt/ros/${{ matrix.node }}/setup.sh
colcon test --packages-select is-fastdds --event-handlers console_direct+
colcon test-result
- name: Test the Integration Service ROS 1 SystemHandle
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
. /opt/ros/noetic/setup.sh
roscore &
echo "Waiting until roscore has been launched..."
sleep 5
. install/local_setup.sh
colcon test --packages-select is-ros1 --event-handlers console_direct+
colcon test-result
- name: Test the Integration Service ROS 2 SystemHandle
run: |
. install/setup.sh
RMW_IMPLEMENTATION=rmw_fastrtps_cpp colcon test --packages-select is-ros2 --event-handlers console_direct+
colcon test-result
- name: Test the Integration Service WebSocket SystemHandle
run: |
colcon test --packages-select is-websocket --event-handlers console_direct+
colcon test-result
- name: Test the Integration Service FIWARE SystemHandle
run: |
# launch context-broker in a container
docker run -d --rm --name mongo --network host mongo:4.4 --bind_ip_all
docker run -d --rm --name broker --network host fiware/orion -dbhost 127.0.0.1
# launch tests
. /opt/ros/${{ matrix.node }}/setup.sh
colcon test --packages-select is-fiware --event-handlers console_direct+
colcon test-result
# stop containers
docker stop mongo broker