本文由 AI 分析生成
建立時間: 2026-04-18 來源: https://github.com/ros-industrial/industrial_ci
Summary
industrial_ci is a reusable CI library maintained by the ROS-Industrial consortium. Any ROS/ROS2 package can adopt it with a single uses: ros-industrial/industrial_ci@master line in a GitHub Actions workflow. It runs entirely inside Docker, uses colcon (ROS2) or catkin_tools (ROS1) to build the workspace, runs all registered tests, and optionally applies static analysis (clang-tidy, clang-format, pylint, black) and ABI compatibility checks.
industrial_ci 是 ROS-Industrial 社群維護的可重用 CI 函式庫。任何 ROS/ROS2 套件只需在 GitHub Actions 工作流程中加入一行 uses: ros-industrial/industrial_ci@master 即可採用。它在 Docker 內執行,以 colcon(ROS2)或 catkin_tools(ROS1)建置工作區,執行所有已定義的測試,並可選擇性地進行靜態分析(clang-tidy、clang-format、pylint、black)及 ABI 相容性檢查。
Key Points
- Zero boilerplate CI: One
uses:line gives you a complete build-test-lint pipeline with no shell scripting - Docker-based isolation: CI runs in official ROS Docker images; you can override with
DOCKER_IMAGEfor custom environments - Multi-distro matrix: Use GitHub Actions matrix strategy with
ROS_DISTROto test against multiple ROS versions in one push - Workspace dependency management:
UPSTREAM_WORKSPACEandDOWNSTREAM_WORKSPACEallow testing packages with their full dependency tree, even across repos - Code quality gates:
CLANG_FORMAT_CHECK,CLANG_TIDY,PYLINT_CHECK,BLACK_CHECKturn linting into hard CI failures - ABI check:
ABICHECK_URLenables backward-compatibility verification — useful for library maintainers - Prerelease testing:
PRERELEASE=trueruns the official ROS prerelease test suite inside Docker
Insights
The core value proposition is standardization: instead of each ROS package author writing their own CI YAML, they inherit a tested, community-maintained pipeline. This is especially useful for the ROS-Industrial ecosystem where packages must stay compatible across distros. The UPSTREAM_WORKSPACE mechanism solves a real ROS pain point — packages often have non-released dependencies that need to be built from source before the target package can compile.
The Docker-in-CI architecture means the build environment exactly matches a vanilla ROS install, avoiding “works on my machine” divergence. The CCACHE_DIR variable is critical for keeping CI times under control when rebuilding large C++ workspaces.
Connections
Raw Excerpt
This package contains CI scripts that any ROS-powered packages can commonly use. Main CI processes of industrial_ci run on Docker.