ci: benchmark clean and incremental builds#1022
Conversation
Build optimization overviewAll CI checks pass on the complete PR stack (x64 and ARM64 builds, benchmarks, and pre-commit).
Compared with the baseline:
These are single CI measurements, so small differences should be treated as runner noise; the larger ccache gains are the clearest signal. |
Repeated benchmark results (3x)The consolidated benchmark workflow passed on both architectures. Each configuration ran three clean/incremental pairs on the same runner per architecture; all build return codes were zero.
The ccache means include one cold population and two warm rebuilds. The clean-build split makes the effect clearer:
Compared with the repeated Make baseline:
Conclusion: Ninja alone is a modest incremental-build improvement, while ccache is the dominant optimization for repeated clean and incremental development builds. The production profile remains a runtime/deployment choice rather than an additional compilation-speed optimization. |
Summary
Add a reproducible build benchmark for comparing clean and incremental ROS workspace builds on both CI architectures.
Proposed changes
Impact
This establishes the baseline used by the stacked build-time optimization PRs. It does not change build flags or robot runtime behavior.
Validation
python3 -m py_compile scripts/benchmark_build.pypython3 scripts/benchmark_build.py --helppixi run -e default ruff check scripts/benchmark_build.pypixi run -e default ruff format --check scripts/benchmark_build.pygit diff --checkA complete clean/incremental workspace build is intentionally delegated to this PR's benchmark workflow.