-
Notifications
You must be signed in to change notification settings - Fork 113
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
Fix sccache for CI #2473
Fix sccache for CI #2473
Conversation
51159fb
to
a4367fd
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.
Thanks! Very much looking forward to caching!
|
||
# TODO(#2014): Re-enable sccache once runner runs backend binaries directly rather than using `cargo run`. | ||
# ENV RUSTC_WRAPPER sccache | ||
ENV RUSTC_WRAPPER sccache |
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.
Do we want to link #2014 ?
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.
Done.
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.
Done.
.github/workflows/ci.yaml
Outdated
@@ -84,16 +84,33 @@ jobs: | |||
# See https://doc.rust-lang.org/nightly/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci | |||
- name: Cache Rust artifacts | |||
uses: actions/cache@v2 | |||
if: | | |||
${{ matrix.cmd == 'run-cargo-clippy' || matrix.cmd == 'run-functions-examples --application-variant=rust' }} |
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.
Did caching work? Because if I understand the last CI run correctly, run-cargo-clippy took still 36 min (https://github.com/project-oak/oak/runs/4769340244?check_suite_focus=true). We'd expecting this to be less, no? But it seems we just kicked off a run again!
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 got a run with cargo clippy running in 4 mins instead of 40 mins (with no changes to the code), but now it's hard to reproduce because the cache keeps being evicted by other jobs. I think we'll have to submit this and see how it goes to have more useful data.
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.
Sounds good to submit and observe!
But should we maybe note somewhere (e.g., the title), that the sccache is only working for run-cargo-clippy and Rust run-function-examples? We still may want to look into run-cargo-tests, if this works well, no?
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.
SG, I think the next thing to explore would be the single workspace though, there is just not enough space available to enable it for another step, otherwise I would do that already.
a4367fd
to
0b1a24a
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.
Thanks!
0b1a24a
to
137c0ae
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.
Thanks
Run locally only instead of using GCS, and then use GitHub Actions cache to cache the sccache directory and most other Rust target directories. Caching is only enabled for some steps currently, as there is not enough space available for the cache entries otherwise. We should look into how to unify some of our crates separately, and then enable caching for more steps. Ref project-oak#2474 Fix project-oak#2014
137c0ae
to
a749bf0
Compare
Reproducibility Index:
Reproducibility Index diff: |
Fix sccache for CI
Run locally only instead of using GCS, and then use GitHub Actions cache
to cache the sccache directory and most other Rust target directories.
Caching is only enabled for some steps currently, as there is not enough
space available for the cache entries otherwise. We should look into how
to unify some of our crates separately, and then enable caching for more
steps.
Ref #2474
Fix #2014