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
ci: Benchmark CI Step #3480
ci: Benchmark CI Step #3480
Conversation
93a5248
to
cb551d3
Compare
@Boshen It's not fully functional yet nor have I tested the caching but I think you could find some of it interesting ;) |
669a3cf
to
1ac2016
Compare
Okay, caching and running PR/main on different runners is a bad idea. The runtime difference is too big even if there are no changes. |
65bae7d
to
844d366
Compare
This is great! Two quick comments since I was working recently on the ecosystem CI check which also comments on the PR:
|
Very clever approaches for speeding up CI times! Thank you @MichaReiser, I stole this faster than you could merge this PR ;-) I wonder if we can also build the binary on main and then just download it on the PR 🤔 Uploading the binary from the test step doesn't work I think, it it seems to be uploading a debug build? |
Thanks for that work. I used your job as inspiration on how we can improve the benchmarking, and it seems there's more for me to learn 😃
Yes, I'll give that a try
😆 Thank you! I saw your PR yesterday and was, wow, that was quick. I should update the PR summary to clarify that this workflow is heavily inspired by your work on Rome's and OXC's benchmarks! |
eec0f44
to
ba8685c
Compare
PR Check ResultsEcosystem✅ ecosystem check detected no changes. BenchmarkLinux
Windows
|
0e6c1b0
to
b719de5
Compare
b719de5
to
8e63a2a
Compare
I implemented the recommended changes. I haven't been able to test the caching because it requires triggering a build on main.... which I can only do after this PR lands. EDIT: Caching on main isn't as straightforward as I have thought with our approach where we use One thing we could try is to setup a release build for main that warms the cache but I would prefer to leave this for another PR. Mainly because we should potentially re-visit our caching overall to avoid running into GitHubs 10GB cache limit, which results in cache-pruning (e.g. warm the cache on main for test, and release build, don't populate the cache from PR branches) |
- name: Run ecosystem check | ||
run: | | ||
# Make executable, since artifact download doesn't preserve this | ||
chmod +x ruff ${{ steps.ruff-target.outputs.download-path }}/ruff | ||
|
||
scripts/check_ecosystem.py ruff ${{ steps.ruff-target.outputs.download-path }}/ruff | tee ecosystem-result | ||
cat ecosystem-result > $GITHUB_STEP_SUMMARY |
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 adds the ecosystem output to the CI job summary
@@ -80,6 +80,7 @@ jobs: | |||
# Setting RUSTDOCFLAGS because `cargo doc --check` isn't yet implemented (https://github.com/rust-lang/cargo/issues/10025). | |||
RUSTDOCFLAGS: "-D warnings" | |||
- uses: actions/upload-artifact@v3 | |||
if: ${{ matrix.os == 'ubuntu-latest' }} |
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.
We only need the linux binary. Trying to run this on windows creates a warning because the file is named ruff.exe
and not ruff
5e11bb6
to
c0566f3
Compare
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.
I love this
71f4a69
to
fbb1bbc
Compare
This PR adds a new benchmark step that runs for every pull request and compares the PR performance against main. The action writes a comment (or updates an existing one) with the results.
This is inspired and partially based on Rome's and OXC's benchmarking setup that @Boshen created.
Test Plan
See this comment