Skip to content

fail if compiled size of breakout example in release increase by more than 0.5% #20289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mockersf
Copy link
Member

Objective

  • Fail in CI when compiled size increase too much

Solution

  • When merging, build on base, build on head, compare the two sizes
  • Fail when the new size is more than 100.5 * old size
  • Current size on macOS is 81MB, this would allow a size increase of 417kB

@mockersf mockersf added the A-Build-System Related to build systems or continuous integration label Jul 25, 2025
@IceSentry
Copy link
Contributor

Is there a way to allow an increased size if we know we'll do something that increases it? Or is the plan in these cases that we'd merge a PR that increases the limit first

@mockersf
Copy link
Member Author

mockersf commented Jul 25, 2025

Is there a way to allow an increased size if we know we'll do something that increases it? Or is the plan in these cases that we'd merge a PR that increases the limit first

Yup!
The maintainer trying to merge the PR can make this job not required in the branch protection rules so that it's not blocking a merge 😄

Not the best, but if the other maintainers agree I think it would be good enough to test drive this. if it happens too often, we could look into adding a label to ignore this check

@hymm
Copy link
Contributor

hymm commented Jul 25, 2025

should this just be a fixed size? having it be a percentage feels a bit off. i.e. if we're talking about a pr that embedded a 1MB asset if the current executable size is 200MB then this would be allowed. But I feel like we'd want to deny any 1MB increase in size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build-System Related to build systems or continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants