Skip to content

CI: Add workflow to check and monitor final binary size of example builds #105

@AnthonyGrondin

Description

@AnthonyGrondin

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

Disclamer: This issue was partially written with the assistance of GitHub Copilot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions