-
Notifications
You must be signed in to change notification settings - Fork 182
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: add sccache to speed up ci build #824
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: xxchan <[email protected]>
@@ -104,6 +106,9 @@ jobs: | |||
steps: | |||
- uses: actions/checkout@v4 | |||
|
|||
- name: Setup sccache | |||
uses: mozilla-actions/[email protected] |
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.
The latest version is 0.0.7, but I only see 0.0.4 listed here https://github.com/apache/infrastructure-actions/blob/main/approved_patterns.yml
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.
Should we consider submit a pr to ask infra team to update approved pattens? cc @Xuanwo
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.
heres the original issue for 0.0.4
https://issues.apache.org/jira/browse/INFRA-25525?jql=text%20~%20%22sccache-action%22
Signed-off-by: xxchan <[email protected]>
15cb5f9
to
deb7371
Compare
comparison: after: https://github.com/apache/iceberg-rust/actions/runs/12395899529?pr=824 Seems not as good as expected, but generally reduced >1 min. UT reduced >2 min |
Seems caused by Mozilla-Actions/sccache-action#50 |
Windows build took even longer after the change 🤔 |
The cache hit rate was very low, and there's plenty of Cache write errors (I guess it's rate limit Mozilla-Actions/sccache-action#50). After running it for more times to warm up the cache, it should perform better. |
I found an alternative to They work differently:
It's possible that IMO sticking with |
I'm not a big fan of checking in |
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.
Thanks @xxchan for this pr! Personally I have no strong opinions about this, as it doesn't seem to improve performance too much, while rate limit error may even slow down the test. But in general it's not bad for rust project. I'm looking forward to hear others' ideas. cc @Xuanwo @Fokko @kevinjqliu
Just FYI that it's not considered an antipattern any more https://blog.rust-lang.org/2023/08/29/committing-lockfiles.html And e.g., opendal has it: https://github.com/apache/opendal/blob/main/core/Cargo.lock I don't have strong opinion and I'm OK with both though. |
Since this PR only affects CI and seems to be an overall improvement. I don't see any downside of including this btw im not sure if everyone has access to apache INFRA jira, happy to open a ticket to allow the |
The downside is additional complexity and maintenance. The Windows job takes the most time, and after the change it takes even more, so the maximum runtime gets worse, just the average runtime improves. I'm leaning toward what @liurenjie1024 is saying, and avoiding caching. Curious to learn what @Xuanwo thinks |
4b8e5ca
to
92e30c4
Compare
92e30c4
to
22013a8
Compare
Signed-off-by: xxchan <[email protected]>
Thanks for the reference, I wasn't aware of it. Would you mind to have a try with rust-cache? I'm not sure about the difference and it would be better to make decision with actual pr and result. |
e.g., the
unit
job takes 10min in total, and build takes 5min. So I think we can introduce cache to speed it up.