-
-
Notifications
You must be signed in to change notification settings - Fork 801
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: Use sccache-action instead of rust-cache #4468
Conversation
You have to allow the new action in the repo configuration. It's |
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.
Adding aditional explanations to the changes
@@ -130,7 +130,7 @@ def __init__(self, name, path, key): | |||
|
|||
class CacheRustStep(ActionStep): | |||
def __init__(self, name, key): | |||
super().__init__(name, action="Swatinem/rust-cache@v2", params={"key": key}) | |||
super().__init__(name, action="mozilla-actions/sccache-action@v0.0.3") |
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.
sccache
has no way of adding a custom key yet(?). Might or might not trip us up
I might restart the generate ci script rewrite effort... Thanks for all the work! I've really enjoyed using wezterm and I hope I can do some more work on improving this c: |
I've added this action to the allow list; I think you might need to push/bump again this PR for the actions to run. |
bfbe65c
to
5136fc8
Compare
OpenSuse Leap is failing because it cannot find Should I add it as a dependency to |
|
Besides the Results: (click me)Clean Cache
Warm? Cache
ConclusionThe environment is not optimal to test the impact:
My guess is Potential Improvements
|
Thanks for looking at this! I'm considering removing the opensuse builds from the GH CI because they are the most unreliable platforms: they often break in weird ways for days at a time. I recently added COPR builds for several platforms (https://wezfurlong.org/wezterm/install/linux.html#installing-on-fedora-and-rpm-based-systems-via-copr) which makes it less critical to have GH run so many itself. Provided that failures of the COPR build bubble up and are noticed by me; that's currently a missing piece.
My mental model is: it goes in |
re: mixed results; I'm increasingly of the opinion that GH actions runners are under powered for the projects that I work on; the disk space in the runners isn't especially generous and the total amount of storage for caches is limiting when there are multiple platforms to support. wezterm's CI hasn't quite reached the limits of cache space, but I did hit them over in kumomta and decided to move its CI to a locally hosted woodpecker ci, which makes a significant difference (40 minute unreliable builds on GH -> 3 mins cached or ~5 mins cold on my woodpecker box). That works for kumomta because the number of platforms are small and I have just enough hardware for that. Based on that experience, I suspect that adding more platforms to wezterm will introduce similar reliability issues with caching and my lead to disabling caching for some of them, or just punting them to other build systems (like COPR). |
I've also hit the limits of the CI machines in a very small project (which was installing ROCm and thus using 10+GiB of space).
|
macos caching is working! 🎉 45min vs 56min! Cache hits are better on the weird workflows (centos7 and macos). Windows seems to still be having trouble. I'll have more time to look at this on Wednesday hopefully. I need to fix the |
Caching the dependencies with |
Now that tar is installed in OpenSUSE, both are (expectedly) failing the tests! Conclusion of the experiment: tl;dr
|
Sorry it took a while to get back to this. I like the idea of using less cache space. I think the changes are reasonable also. Would you mind rebasing this PR? I think it is mergeable! |
eddfb0c
to
6bc640c
Compare
I'm gonna have to look at this again, after the rebase I apparently messed something up as the actions use both cache methods now 🥲 Hopefully I can do this tomorrow, otherwise it might take a week... |
I feel so dumb... That was all me, I did it... everything is working as intended... For future confused me: We use I was planning on squashing everything into two commits; the python changes and the workflow changes. Are you okay with me doing that? |
I will often just click the "squash and merge" button if I feel like the number of commits in a PR is a bit high/verbose. |
It reduced ci times for fluke from 9min to 1min in MacOS (see [this issue](bearcove/loona#118)). This [comment](wez#4468 (comment)) has the TL;DR of the results from adding it. The summary of that is caching works on MacOS now and it uses the github cache much better.
6bc640c
to
52aa3e7
Compare
It was a nice moment for me to learn about interactive rebases so I took the opportunity c: The history should be much tidier now. |
It reduced ci times for fluke from 9min to 1min in MacOS (see [this issue](bearcove/loona#118)). This [comment](wez#4468 (comment)) has the TL;DR of the results from adding it. The summary of that is caching works on MacOS now and it uses the github cache much better.
This doesn't improve the build times, but it does reduce the requests we make to `crates.io`.
52aa3e7
to
d392cf6
Compare
It reduced ci times for fluke from 9min to 1min in MacOS (see [this issue](bearcove/loona#118)). This [comment](#4468 (comment)) has the TL;DR of the results from adding it. The summary of that is caching works on MacOS now and it uses the github cache much better.
Thank you again! |
Looking at this a month after, the cache usage looks much better 🎉 $ gh cache list --json sizeInBytes -q '([.[].sizeInBytes] | add) / (1024 * 1024)' --limit 16716
7539.66
$ gh cache list --json sizeInBytes -q '([.[].sizeInBytes] | add) / (1024 * 1024)' --limit 16716 --key sccache
6535.33 Numbers in MiB. On other news; I am preparing myself mentally to rewrite the ci script so I can tackle #3360 . The basic idea I have is to use a |
It reduced ci times for fluke from 9min to 1min in MacOS (see this issue) so I thought it would be worth a try here too.
sccache
does not have a configurablekey
for the cache so it might not work at all for us.