-
Notifications
You must be signed in to change notification settings - Fork 26
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
WIP: Add cargo bloat action #167
base: main
Are you sure you want to change the base?
Conversation
So, code size for a given PR on it's own doesn't tell me that much, can it report the diff ocmpared to main ? Ideally this should also be runnable locally, i.e. part of ci.sh or some other script, so that devs can test before pushing the PR. Another thing is that we should avoid spawning too many jobs as it will run into the max jobs of embassy-rs. I've not checked if bloat can be used with cargo batch (see ci.sh), but that might be an alternative to speed things up without the additional jobs. |
I was originally going down the route of https://github.com/orf/cargo-bloat-action which gives a nice diff per function to see where things were changing. Sadly it doesnt seem to be maintained :(
Il have a look into this and get back to you :)
I think this is the way we would have to go, in order to get a nice local diff, I think if we make our own script that is callable in ci.sh, this would give the benefits of both CI pipeline and developer experience. |
Chatting with @petekubiak, potentially we could do a simplified script using https://github.com/rust-embedded/cargo-binutils to create a binary diff, thats callable in ci.sh for the developer and posts on the PR as well through the actionbot |
PR Proposal: Tracking bloat on the library
This PR aims to add bloat tracking to our workflow. At present what im suggesting is a simple bot that will spit out the percentage of memory we using for each of our symbols (this can be tweaked to our preferences).
It will run on each pull request so that we can look at code size before we merge and post the sizings as comments on the PR. Each time the PR is updated the previous comment will be hidden(not deleted) so that we don't get too much noise on the actions.
Other things ive looked at
Testing
I would quite like to test it on this repo, but im unable to get it to work until the read write permissions are set. @lulf could you please enable this setting