-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Allow PR builds to read sccache entries from S3 #141948
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
Conversation
Looks like it works. It can be landed separately from #136942. |
@@ -235,6 +235,8 @@ jobs: | |||
env: | |||
AWS_ACCESS_KEY_ID: ${{ secrets.CACHES_AWS_ACCESS_KEY_ID }} | |||
AWS_SECRET_ACCESS_KEY: ${{ secrets.CACHES_AWS_SECRET_ACCESS_KEY }} | |||
# Allow reading (but not writing) sccache on PR builds | |||
SCCACHE_S3_NO_CREDENTIALS: ${{ (needs.calculate_matrix.outputs.run_type == 'pr' && '1') || '0' }} |
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.
aren't we already setting this in
Line 242 in b17dba4
args="$args --env SCCACHE_S3_NO_CREDENTIALS=1" |
If there's a reason why we need to set it also here, feel free to r=me
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.
LOL. I was thinking to myself that this all sounded familiar. I was checking some jobs and the cache didn't have any hits, but now I checked the rest and there were some hits, so I just checked it wrong before 🤦
This PR would also make it work for non-Linux hosts, but we don't have those on PR builds anyway.
Good find!
Use ccache for stage0 tool builds Now after the stage0 redesign, we can actually start ccaching the build of the compiler itself. We can also cache the bootstrap tools, since these are also built with the stage0 compiler. Stage0 compiler builds are now being cached: https://github.com/rust-lang/rust/actions/runs/15397246267#summary-43321151192 (`..bootstrap::core::build_steps::compile::Rustc 483.10s 40.41s -91.6%`). It's not a gigantic win everywhere, but it should help. It seems to make the Linux jobs ~10 minute faster. It should be especially useful on PR builds after #141948. r? `@jieyouxu` try-job: `x86_64-gnu-llvm-19*` try-job: `x86_64-msvc*` try-job: `x86_64-apple*` try-job: `dist-x86_64-linux`
Use ccache for stage0 tool builds Now after the stage0 redesign, we can actually start ccaching the build of the compiler itself. We can also cache the bootstrap tools, since these are also built with the stage0 compiler. Stage0 compiler builds are now being cached: https://github.com/rust-lang/rust/actions/runs/15397246267#summary-43321151192 (`..bootstrap::core::build_steps::compile::Rustc 483.10s 40.41s -91.6%`). It's not a gigantic win everywhere, but it should help. It seems to make the Linux jobs ~10 minute faster. It should be especially useful on PR builds after rust-lang/rust#141948. r? `@jieyouxu` try-job: `x86_64-gnu-llvm-19*` try-job: `x86_64-msvc*` try-job: `x86_64-apple*` try-job: `dist-x86_64-linux`
Use ccache for stage0 tool builds Now after the stage0 redesign, we can actually start ccaching the build of the compiler itself. We can also cache the bootstrap tools, since these are also built with the stage0 compiler. Stage0 compiler builds are now being cached: https://github.com/rust-lang/rust/actions/runs/15397246267#summary-43321151192 (`..bootstrap::core::build_steps::compile::Rustc 483.10s 40.41s -91.6%`). It's not a gigantic win everywhere, but it should help. It seems to make the Linux jobs ~10 minute faster. It should be especially useful on PR builds after rust-lang/rust#141948. r? `@jieyouxu` try-job: `x86_64-gnu-llvm-19*` try-job: `x86_64-msvc*` try-job: `x86_64-apple*` try-job: `dist-x86_64-linux`
Should be useful especially after #136942. The option is documented here.
r? @marcoieni