-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Motivation
Binary size regressions have been identified as a concern in this crate, for example as reported in #79, where examples demonstrated a significant code size increase after certain changes. Early detection of such regressions can help maintain optimal performance and prevent unnecessary surprises for users.
The regression referenced above resulted from an update to a dependency (esp-hal) of this crate rather than from changes within this library. This underscores that binary-size regressions may stem from factors both inside and outside the project.
Proposal
Add a CI workflow to automatically check and track the final binary size of example builds on each pull request or push. The workflow should:
- Build selected examples for relevant targets
- Output and summarize the resulting binary sizes
- Upload size summary as an artifact for keeping history
- Compare sizes with base/main branch (or previous tag), and flag/regress when differences exceed a threshold
- Optional: Create a graph with each revision tracking the size progression (See reference below)
Reference
- CI: Add a workflow for checking binary size esp-hal#4369)
Note: The initial implementation received subsequent improvements further down the line that should be taken into account. - Examples binary size increased by +10% after esp-rs/esp-mbedtls#77 #79 (comment)
Disclamer: This issue was partially written with the assistance of GitHub Copilot.