-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
chore(ci/pr): print size of respec-w3c #3398
base: main
Are you sure you want to change the base?
Conversation
.github/workflows/pr.yml
Outdated
@@ -50,6 +50,11 @@ jobs: | |||
run: | | |||
npm ci | |||
npm run build:w3c | |||
- name: Size of respec-w3c | |||
run: | | |||
npx -q brrr builds/respec-w3c.js -o builds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very cute, but it would be more cute 🐨 if it showed in comparison to the old build... otherwise, it doesn't mean much, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would require building twice..
There's https://github.com/preactjs/compressed-size-action to do the heavy lifting, but only tells of compressed size. I'm interested in both compressed and uncompressed. I might create an action for that maybe 🐱
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would require building twice...
Hmm... could we look at sizes before "npm run build:w3c" runs, then store them somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building adds like 3-4 seconds, so I think might be okay to be build twice.
Storing adds its own maintenance issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building adds like 3-4 seconds, so I think might be okay to be build twice.
Yeah, that's fine. It's only for us, after all.
Storing adds its own maintenance issues.
Oh, I was thinking just a simple environment variable, like:
ORIGINAL_BUILD_SIZE=$(stat -f%z builds/respec-w3c.js)
Just for quick comparison.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be comparing to previous release. I'm interested in comparing since last commit to base branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless you mean comparing size with the one we just built in previous step, which is something I'll do when I create that action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok cool.
Will build an action later based on: https://github.com/w3c/respec/blob/e464b16f180b16b245d7141d74969e9d7c785596/.github/workflows/pr.yml#L32-L50 |
It'll show up in "headless tests" step:
![image](https://user-images.githubusercontent.com/8426945/111990191-c5ecec00-8b38-11eb-960f-5be89ded53e6.png)