GithubHelp home page GithubHelp logo

orf / cargo-bloat-action Goto Github PK

View Code? Open in Web Editor NEW
95.0 95.0 13.0 1.9 MB

Track rust binary sizes across builds using Github Actions

License: MIT License

TypeScript 99.13% Rust 0.87%
actions cargo github-actions rust

cargo-bloat-action's Introduction

Hello! ๐Ÿ‘‹

  • ๐Ÿ˜Ž I'm Tom
  • ๐Ÿ  I live in London
  • ๐Ÿ I like Python
  • ๐Ÿฆ€ And rust
  • ๐ŸŒ check out my blog

cargo-bloat-action's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar imgbotapp avatar orf avatar teymour-aldridge avatar vrixyz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cargo-bloat-action's Issues

Permission problem posting comments

I've setup by workflow pretty much as a copy/paste of the example repo. Everything looks good up until the moment it tries to post a comment:

image

(CI run log)

Is there some undocumented step I'm missing to set this up to reply to PR requests?

No comment on pull requests

So I added cargo bloat to a project, but cargo bloat doesn't add any comments, even though the tests are passing.

See for yourself: rustracer/rustracer#22

For the details, I'm seeing:
image

No mentions of a posting step, which we can see in this repo:
image

Thanks for your help ๐Ÿ™

Usability improvements for non-crate mode

Taken from @therealprof in #147 (comment)

The issues noted here can be seen from: stm32-rs/stm32f4xx-hal#159 (comment)

It doesn't quite yield the expected output though. ;)

This is the human-readable output:

File  .text   Size         Crate Name
0.3%  39.2% 1.2KiB    dwt_blinky dwt_blinky::__cortex_m_rt_main
0.3%  36.9% 1.1KiB           std __udivmoddi4
0.0%   5.2%   158B           std __aeabi_memset4
0.0%   3.9%   116B   cortex_m_rt Reset
0.0%   3.3%   100B stm32f4xx_hal stm32f4xx_hal::dwt::Delay::delay_ticks
0.0%   3.2%    96B           std __aeabi_memset
0.0%   2.4%    72B stm32f4xx_hal stm32f4xx_hal::dwt::StopWatch::lap_time
0.0%   1.6%    48B stm32f4xx_hal core::iter::traits::iterator::Iterator::min_by_key::key::{{closure}}
0.0%   0.7%    22B           std __aeabi_uldivmod
0.0%   0.3%    10B   cortex_m_rt ResetTrampoline
0.0%   0.3%    10B           std core::panicking::panic_fmt
0.0%   0.3%    10B           std core::panicking::panic_bounds_check
0.0%   0.3%    10B           std core::panicking::panic
0.0%   0.3%    10B     [Unknown] main
0.0%   0.2%     6B           std __aeabi_memclr4
0.0%   0.1%     2B   cortex_m_rt HardFault_
0.0%   0.1%     2B    panic_halt rust_begin_unwind
0.0%   0.1%     2B   cortex_m_rt DefaultPreInit
0.0%   0.1%     2B   cortex_m_rt DefaultHandler_
0.0%   0.0%     0B               And 0 smaller methods. Use -n N to show more.
0.9% 100.0% 2.9KiB               .text section size, the file size is 342.6KiB

Few things of note:

  • The toolchain is running on stable-x86_64-unknown-linux-gnu but the target is thumbv7em-none-eabihf (I would said the target is more important to know than the host architecture)
  • @@ Breakdown per crate @@ should probably be @@ Breakdown per function @@ if the function mode is enabled
  • It only lists the first two functions?
  • While the total file size might be interesting every now and the really interesting metric here is the code (or .text) size, the complete file size also contains debugging information and other data which may not even end up in memory when running the binary

Sane handling of non-bin and non-lib crates

I understand that this action has the dubious convenience of parsing the manifest and adding all the packages that cargo bloat wouldn't into the list of packages to process. This is an acceptable (if inefficient) method, but it has a few problems.

Normally, cargo bloat ignores the projects that it can't work with. The action fails and stops.

Normally you can manually specify the packages (or binaries) for which we need to test for bloat. In this action I have to specify every workspace in the package (which normally outnumber the libraries). Moreover, the syntax is not explained. I expected a sequence to be an acceptable input.

Solution

  1. Don't fail fast on crates that are not supported. Just skip them
  2. Don't try to outsmart cargo bloat.
  3. Instead of specifying the exclude crates specify included packages.

Size difference between Ubuntu & MacOS builds?

Hello!

I am seeing in my CI reports that the total size is ~6mb - this is built on Ubuntu. While on my mac I can see the release build cosnuming ~2.2mb. Is such a difference possible? Is it maybe action not building with release?

Thanks,
H.

Fetching last build fails

I'm having trouble setting up your action. Particularly, the initial bootstrap, since your action fails at trying to fetch the previous step that doesn't exist. Since I don't see any way in which I can set it up to be the first run, I would imagine that this is one of many usability oversights in your action.

I don't actually want you to reply to this issue, I want you to ghost it, so that I can convince our team that we don't need your hacky piece of ... generously put.. software, and convince them to write a different action for our specific uses.

Analyze snapshots in runner

Thanks for the nice action!

I have a question about this action.
This seems to use cloud-function to analyze snapshots.

If it's right, do you have plan to analyze them in runner?
I want to keep data, cargo bloat results, in private github.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.