How robotology/robotology-superbuild works
Project Type and Purpose
• This is a “superbuild” meta-repository (robotology-superbuild) whose sole responsibility is to orchestrate the download, configuration, compilation, testing, and packaging of dozens of Robotology-related C++/Matlab/Python projects.
• It uses CMake (with the YCM modules) as the build orchestrator, supports multiple dependency providers (apt, conda-forge, pixi, deprecated vcpkg), and offers binary packaging (conda recipes, Windows installers, Docker images).
File Structure Analysis
• Top-level:
• .ci, .github/workflows, scripts – CI pipelines & helper scripts
• cmake/… – dozens of per-package “BuildFoo.cmake” modules + superbuild logic
• conda/… – conda-forge recipe generation & multishell activation scripts
• packaging/windows/… – Windows installer build scripts
• doc/… – user & developer documentation
• releases/… – YAML lists of package versions for each quarterly release
• Key patterns:
• “ExternalProject” / FetchContent per subproject (each Build*.cmake)
• Profile-based enable/disable of subsets (via CMake options)
• Dependency-provider abstraction (apt vs conda vs pixi vs vcpkg)
• Multi-platform CI via GitHub Actions building Docker, conda packages, Windows binaries
README Insights
• Core concept: a CMake superbuild that pulls in each Robotology component into src/<name>, builds in build/src/<name>, installs into build/install.
• Supports “rolling update” vs “frozen releases” (profiles & tags)
• Binary distribution via conda-forge & robotology channels
• Source installation on Linux/macOS/Windows (apt or conda or pixi) or WSL
Components
a. Build Orchestrator Layer
• Main CMakeLists.txt + YCM modules (RobotologySuperbuildLogic, Options, Bootstrap)
• Per-package Build*.cmake scripts (in cmake/)
b. Dependency Providers
• apt installer (scripts/install_*.sh + apt.txt)
• Conda recipe generator (conda/cmake → CondaGenerationOptions, recipe templates)
• pixi (pixi.toml, pixi.lock, pixi activation scripts)
• Deprecated vcpkg path (doc/deprecated-installation-methods.md)
c. Subprojects (External Projects)
• YARP, iCub, iDynTree, CasADi, Gazebo-YARP-Plugins, human‐dynamics,…
• Each fetches source into src/<name>, builds into build/src/<name>
d. Build Artifacts & Installation
• build/install (final prefix) → setup.sh / setup.bat sets environment vars
• packaging outputs: conda packages, Docker images, Windows installer
e. CI/CD Layer
• GitHub Actions workflows (ci.yml, build-docker-images.yml, generate-conda-packages.yml, release.yml)
• scripts to bump versions, update locks, generate packages
Relationships & Data Flows
• Build Orchestrator → Subprojects (fetch & build)
• Subprojects → install prefix (artifacts flow)
• install prefix → packaging modules → binary outputs (conda recipes, installers, Docker)
• CI pipelines consume: source repo + packaging logic → produce build artifacts, run tests, publish releases
Architectural Patterns & Principles
• Modular ExternalProject pattern: each package is an isolated CMake ExternalProject via Build*.cmake
• Profile-driven inclusion/exclusion: high configurability via CMake options
• Separation of concerns: build orchestration, dependency acquisition, packaging, CI all clearly layered
• Reuse: common YCM modules for fetching, tagging, developer-mode, update targets
Technologies & Frameworks
• CMake (≥3.19) + YCM
• ExternalProject / FetchContent
• apt, conda-forge, pixi, vcpkg
• GitHub Actions
• Docker
• scripts (bash/PowerShell)
Essential Elements
• Installation prefix (“build/install”) feeding “setup scripts”
• Packaging modules → outputs (conda packages, installers, Docker images)
• CI/CD layer at top driving all stages