Skip to content

delete r2s_gw_dashboard #111

delete r2s_gw_dashboard

delete r2s_gw_dashboard #111

Workflow file for this run

# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
# Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
name: ROS2 Tests
on:
push:
branches: [ "**" ] # Run on all branches
env:
ROS_LOCALHOST_ONLY: 1
ROS_AUTOMATIC_DISCOVERY_RANGE: LOCALHOST
jobs:
test:
name: Test ROS2 ${{ matrix.ros_distro }}
runs-on: ubuntu-latest
container:
image: ubuntu:${{ matrix.ubuntu_distro }}
strategy:
fail-fast: false
matrix:
include:
- ros_distro: humble
ubuntu_distro: jammy
- ros_distro: iron
ubuntu_distro: jammy
- ros_distro: jazzy
ubuntu_distro: noble
- ros_distro: kilted
ubuntu_distro: noble
- ros_distro: rolling
ubuntu_distro: noble
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: greenwave_monitor
- name: Clone r2s_gw repository
run: |
# Install git if not already available
apt-get update -qq
apt-get install -y git
# Try to clone the matching branch, fallback to main if it doesn't exist
BRANCH_NAME="${{ github.ref_name }}"
if git ls-remote --exit-code --heads https://github.com/NVIDIA-ISAAC-ROS/r2s_gw.git "$BRANCH_NAME" > /dev/null 2>&1; then
echo "Cloning r2s_gw branch: $BRANCH_NAME"
git clone --branch "$BRANCH_NAME" --depth 1 https://github.com/NVIDIA-ISAAC-ROS/r2s_gw.git r2s_gw
else
echo "Branch $BRANCH_NAME not found in r2s_gw, falling back to main"
git clone --branch main --depth 1 https://github.com/NVIDIA-ISAAC-ROS/r2s_gw.git r2s_gw
fi
shell: bash
- name: Setup ROS repository and install rosdep
run: |
export DEBIAN_FRONTEND=noninteractive
export TZ=Etc/UTC
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
apt-get update -qq
apt-get install -y curl gnupg lsb-release
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 $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2.list
apt-get update -qq
apt-get install -y python3-rosdep python3-colcon-common-extensions build-essential cmake git python3-pip
shell: bash
- name: Initialize rosdep and install dependencies
run: |
rosdep init
rosdep update --include-eol-distros
rosdep install --from-paths greenwave_monitor --rosdistro ${{ matrix.ros_distro }} --ignore-src -r -y
shell: bash
env:
DEBIAN_FRONTEND: noninteractive
- name: Build packages
run: |
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
echo "Building and testing on ROS2 ${{ matrix.ros_distro }}"
colcon build --packages-up-to greenwave_monitor
shell: bash
- name: Install r2s_gw with pip
run: |
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
source install/setup.bash
cd r2s_gw
if [[ "${{ matrix.ros_distro }}" == "jazzy" || \
"${{ matrix.ros_distro }}" == "kilted" || \
"${{ matrix.ros_distro }}" == "rolling" ]]; then
pip3 install --break-system-packages --ignore-installed pygments -e .
else
pip3 install --ignore-installed pygments -e .
fi
shell: bash
- name: Smoke test README commands
run: |
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
source install/setup.bash
set -e
timeout 10s bash -lc "script -qfec 'ros2 run greenwave_monitor ncurses_dashboard' /dev/null <<< \$'q'" || true
timeout 10s bash -lc "script -qfec 'ros2 run r2s_gw r2s_gw_dashboard' /dev/null <<< \$'q'" || true
timeout 5s ros2 launch greenwave_monitor hz.launch.py topics:='["/topic1"]' || true
shell: bash
- name: Run tests
run: |
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
colcon test --event-handlers console_direct+ --return-code-on-test-failure --packages-up-to greenwave_monitor
shell: bash
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.ros_distro }}
path: build/*/test_results/**/*.xml
retention-days: 7