Skip to content
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

maint: add binary size checking to CI #1057

Closed
coilysiren opened this issue Jan 30, 2020 · 0 comments · Fixed by #1079
Closed

maint: add binary size checking to CI #1057

coilysiren opened this issue Jan 30, 2020 · 0 comments · Fixed by #1079
Assignees
Labels
kind/maintenance about releasing / CI / Github / other kind of "meta" project maintenance work status/in-review needs to be reviewed by maintainers before it is accepted

Comments

@coilysiren
Copy link
Member

What problem does this solve?

This fixes the problem of the binary size increasing over time, which is a non-starter for some users (like @oleorhagen!)

Solution description

A script that does the following psuedo-code:

go build urfave/cli --output ./urfave-cli

binarySize = checkBinarySize ( "./urfave-cli" )
expectedBinarySize = 5000

if binarySize > expectedBinarySize then
    fail the build, reason: binary too large
if binarySize < expectedBinarySize * 0.70% then
    fail the build, reason: binary is much smaller now ✨\
        please decrease the expected size

Potential Future Work

If we make the CLI modular (mentioned here #833 (comment)), we can assert different expected binary sizes for the "minimal" vs "complete" versions of the package.

Context

This idea was inspired by #1055

@coilysiren coilysiren added help wanted please help if you can! status/triage maintainers still need to look into this kind/maintenance about releasing / CI / Github / other kind of "meta" project maintenance work labels Jan 30, 2020
@coilysiren coilysiren self-assigned this Feb 29, 2020
@coilysiren coilysiren added status/in-review needs to be reviewed by maintainers before it is accepted and removed help wanted please help if you can! status/triage maintainers still need to look into this labels Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/maintenance about releasing / CI / Github / other kind of "meta" project maintenance work status/in-review needs to be reviewed by maintainers before it is accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant