Skip to content

CI for eProsima Integration Service #289

CI for eProsima Integration Service

CI for eProsima Integration Service #289

Workflow file for this run

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