Skip to content

Test setup-ros

Test setup-ros #15025

Workflow file for this run

name: "Test setup-ros"
on:
pull_request:
push:
branches:
- master
- "releases/*"
schedule:
# Run the CI automatically twice per day to look for flakyness.
- cron: "0 */12 * * *"
defaults:
run:
shell: bash
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
test_environment:
name: "Check development tools"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macOS-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.0.2
with:
node-version: "16.x"
- run: .github/workflows/build-and-test.sh
- uses: ./ # Uses an action in the root directory
- run: .github/workflows/check-environment.sh
test_environment_linux:
name: "Check development tools"
runs-on: ubuntu-latest
container:
image: ${{ matrix.docker_image }}
strategy:
fail-fast: false
matrix:
docker_image:
- ubuntu:20.04
- ubuntu:22.04
- ubuntu:24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.0.2
with:
node-version: "16.x"
- run: .github/workflows/build-and-test.sh
- uses: ./ # Uses an action in the root directory
- run: .github/workflows/check-environment.sh
# Validates that once setup-ros finished, the ROS distribution
# setup.sh / local_setup.bat can be sourced, and the ROS distribution is
# functional.
test_ros_binary_install:
name: "Check ROS distribution"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
# TODO(ros-tooling/setup-ros#107): Add OS X support
# - macOS-latest
- windows-latest
ros_distribution:
# Humble Hawksbill (May 2022 - May 2027)
- humble
# Iron Irwini (May 2023 - November 2024)
- iron
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.0.2
with:
node-version: "16.x"
- run: .github/workflows/build-and-test.sh
- uses: ./ # Uses an action in the root directory
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- run: .github/workflows/check-environment.sh
- run: .github/workflows/check-ros2-distribution.sh "${{ matrix.ros_distribution }}"
if: matrix.os != 'windows-latest'
- env:
ROSDISTRO: ${{ matrix.ros_distribution }}
run: .github/workflows/check-ros2-distribution-win.bat
shell: cmd
if: matrix.os == 'windows-latest'
test_ros_binary_install_ubuntu:
name: "Check ROS distribution"
strategy:
fail-fast: false
matrix:
ros_distribution:
- noetic
- humble
- iron
- jazzy
- rolling
# Define the Docker image(s) associated with each ROS distribution.
# The include syntax allows additional variables to be defined, like
# docker_image in this case. See documentation:
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build
#
# Platforms are defined in REP 3: https://ros.org/reps/rep-0003.html
include:
# Noetic Ninjemys (May 2020 - May 2025)
- docker_image: ubuntu:focal
ros_distribution: noetic
ros_version: 1
# Humble Hawksbill (May 2022 - May 2027)
- docker_image: ubuntu:jammy
ros_distribution: humble
ros_version: 2
# Iron Irwini (May 2023 - November 2024)
- docker_image: ubuntu:jammy
ros_distribution: iron
ros_version: 2
# Jazzy Jalisco (May 2024 - November 2029)
- docker_image: ubuntu:noble
ros_distribution: jazzy
ros_version: 2
# Rolling Ridley (see REP 2002: https://www.ros.org/reps/rep-2002.html)
- docker_image: ubuntu:noble
ros_distribution: rolling
ros_version: 2
# ROS 1 tests only run on Ubuntu
container:
image: ${{ matrix.docker_image }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.0.2
with:
node-version: "16.x"
- run: .github/workflows/build-and-test.sh
- uses: ./ # Uses an action in the root directory
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
# Use ros2-testing repo for Jazzy before it's officially release
use-ros2-testing: ${{ (matrix.ros_distribution == 'jazzy') || (matrix.ros_distribution == 'rolling') }}
- run: .github/workflows/check-environment.sh
- run: .github/workflows/check-ros-distribution.sh "${{ matrix.ros_distribution }}"
if: matrix.ros_version == 1
- run: .github/workflows/check-ros2-distribution.sh "${{ matrix.ros_distribution }}"
if: matrix.ros_version == 2
test_repo_with_root_setup_cfg:
name: "Test with setup.cfg file in root directory (Linux only)"
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.0.2
with:
node-version: "16.x"
- run: .github/workflows/build-and-test.sh
- run: cp .github/workflows/test_setup.cfg setup.cfg
- uses: ./ # Uses an action in the root directory
- run: colcon --help
test_on_setup_ros_docker_container:
name: "Test on a setup-ros-docker container"
runs-on: ubuntu-latest
container:
image: rostooling/setup-ros-docker:ubuntu-noble-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.0.2
with:
node-version: "16.x"
- run: .github/workflows/build-and-test.sh
- uses: ./
test_install_connext:
name: "Test with RTI Connext DDS"
runs-on: ubuntu-latest
container:
image: ${{ matrix.docker_image }}
strategy:
fail-fast: false
matrix:
docker_image:
- ubuntu:24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.0.2
with:
node-version: "16.x"
- run: .github/workflows/build-and-test.sh
- uses: ./
with:
install-connext: true
- run: .github/workflows/check-environment.sh
- run: dpkg -l | grep rti-connext-dds-