mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-09 14:27:02 +08:00
feat: support multiple ROS 2 distributions
This commit is contained in:
@@ -1,20 +1,30 @@
|
||||
name: colcon
|
||||
name: CI
|
||||
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
# build on Ubuntu docker images
|
||||
build:
|
||||
name: "${{ matrix.image }} (${{ matrix.ros }})"
|
||||
name: "ROS2 ${{ matrix.ros }} (${{ matrix.os }})"
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: ${{ matrix.ros == 'rolling' }}
|
||||
env:
|
||||
ROS_DISTRO: ${{ matrix.ros }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- {image: "ubuntu:22.04", ros: humble}
|
||||
- {image: "ubuntu:24.04", ros: jazzy}
|
||||
- {image: "ubuntu:26.04", ros: lyrical}
|
||||
- {image: "ros:foxy-ros-core-focal", os: ubuntu-22.04, ros: foxy}
|
||||
- {image: "ros:humble-ros-core-jammy", os: ubuntu-22.04, ros: humble}
|
||||
- {image: "ros:jazzy-ros-core-noble", os: ubuntu-24.04, ros: jazzy}
|
||||
- {image: "ros:lyrical-ros-core-resolute", os: ubuntu-26.04, ros: lyrical}
|
||||
- {image: "ros:rolling-ros-core-resolute", os: ubuntu-26.04, ros: rolling}
|
||||
|
||||
container:
|
||||
image: ${{ matrix.image }}
|
||||
@@ -22,8 +32,24 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- uses: ros-tooling/[email protected]
|
||||
- name: Install build tools
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
apt-get update
|
||||
apt-get install --no-install-recommends --yes \
|
||||
build-essential \
|
||||
cmake \
|
||||
git \
|
||||
python3-colcon-common-extensions \
|
||||
python3-rosdep
|
||||
rosdep init || true
|
||||
rosdep update --rosdistro "${ROS_DISTRO}" --include-eol-distros
|
||||
|
||||
- uses: ros-tooling/[email protected]
|
||||
with:
|
||||
target-ros2-distro: ${{ matrix.ros }}
|
||||
- name: Install dependencies and build
|
||||
shell: bash
|
||||
run: |
|
||||
set -eo pipefail
|
||||
source "/opt/ros/${ROS_DISTRO}/setup.bash"
|
||||
rosdep install --from-paths . --ignore-src --rosdistro "${ROS_DISTRO}" -y
|
||||
colcon build --symlink-install --event-handlers console_direct+
|
||||
|
||||
Reference in New Issue
Block a user