From 1ad573e549f90c5904c59dd119c093f6d5be90f6 Mon Sep 17 00:00:00 2001 From: "Tomoya.Fujita" Date: Wed, 28 Oct 2026 08:28:27 +0900 Subject: [PATCH] Backport the ABI compatibility check workflow to lyrical Verbatim copy of .github/workflows/abi.yaml from rolling (#3262, #3276, ABI check nor the "ABI compatible" / "ABI break" and backport- labels, because pull_request workflows run from the workflow file of the target branch. Only abi.yaml is needed here: the sticky comment and the labels are published by abi-report.yaml, a workflow_run workflow, which GitHub always runs from the default branch (rolling). The distro and the REP-0009 policy are resolved from the target branch (distro: auto, policy: auto), so the check is strict on lyrical: an incompatible ABI change fails the check. Verified with the same file on test pull request(s) #3385 (compatible) and #3386 (ABI break). Co-Authored-By: Claude Fable 5.1 Signed-off-by: Tomoya.Fujita --- .github/workflows/abi.yaml | 77 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .github/workflows/abi.yaml diff --git a/.github/workflows/abi.yaml b/.github/workflows/abi.yaml new file mode 100644 index 0000000000..fece42a7e9 --- /dev/null +++ b/.github/workflows/abi.yaml @@ -0,0 +1,77 @@ +# This workflow checks ABI compatibility of the shared libraries built from +# this repository on every PR: +# +# - librclcpp.so (rclcpp) +# - librclcpp_action.so (rclcpp_action) +# - libcomponent_manager.so (rclcpp_components) +# - librclcpp_lifecycle.so (rclcpp_lifecycle) +# +# It uses the reusable ros2-abi-action workflow, which: +# 1. resolves the ROS 2 distro from the PR's target branch (rolling/lyrical/kilted/jazzy/humble), +# 2. builds all listed packages twice (once against the target branch, once +# against the PR head) with -g -Og so DWARF debug info is present; a single +# colcon invocation builds the union of the dependency closures exactly once, +# 3. with build-mode: source, imports the distro's ros2.repos and builds +# against today's source tree instead of the released binaries; this is +# required for core repositories like rclcpp, whose dependencies (rcl, +# rmw, ...) are usually ahead of the released Debian packages. The +# incremental strategy starts from the nightly source-built underlay +# image (ros-abi:-source) and recompiles only what moved since, +# 4. expands the soname glob and delegates the binary ABI diff to +# fujitatomoya/libabigail-action (abidiff), one job per library, +# 5. applies REP-0009 policy automatically: released distros (humble/jazzy/kilted/lyrical) +# fail on an incompatible ABI break, rolling is advisory only, +# 6. surfaces the verdict as a pass/fail check and uploads one report bundle +# (abidiff report + verdict.json) per library. +# +# The sticky PR comment, the "ABI compatible" / "ABI break" labels and the +# "backport-" candidate labels are NOT posted from here +# (publish: workflow-run). Most rclcpp pull requests come from forks, and on +# pull_request events from a fork GitHub gives this workflow a read-only token +# regardless of the permissions requested below, so any write to the PR would +# fail. abi-report.yaml runs on workflow_run once this workflow completes and +# publishes the comment and labels with a token that may write. +# +# Paired changes in other repositories (e.g. an rcl PR this PR depends on) are +# declared by the PR author in the PR description and applied to the PR side +# of the build: +# +# Depends-On: ros2/rcl#1234 +# +# See https://github.com/fujitatomoya/ros2-abi-action for details. +name: abi + +on: + pull_request: + branches: [ "rolling", "lyrical", "kilted", "jazzy", "humble" ] + + # Allows you to run this workflow manually from the Actions tab. + workflow_dispatch: + +jobs: + abi: + # Nothing is written to the pull request from this workflow; the report + # workflow holds the write permissions. + permissions: + contents: read + uses: fujitatomoya/ros2-abi-action/.github/workflows/check.yml@v1 + with: + # Colcon package names to build (whitespace-separated); no single package + # depends on all the others, so list every package in this repository. + package: rclcpp rclcpp_action rclcpp_components rclcpp_lifecycle + # Shared libraries produced by the packages above. The glob matches all + # libraries in the install tree; tests are not built (BUILD_TESTING=OFF), + # so no test-only libraries are picked up. + soname: "lib*.so" + # rclcpp is a ROS 2 core repository: its dependencies are developed on + # source branches ahead of the released binaries, so build against the + # distro's ros2.repos source tree (nightly-cached, incremental) instead + # of the binary underlay. + build-mode: source + # auto -> distro derived from the PR target branch. + distro: auto + # auto -> REP-0009: strict on released distros, advisory on rolling. + policy: auto + # Leave the PR comment and labels to abi-report.yaml (workflow_run), so + # pull requests from forks get them too. + publish: workflow-run