Delay CI cache restore until the toolchain has been installed. #732
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The cache action's docs state:
In practice we weren't affected too much, because it turns out the cache key is also derived using all environment variables that have the prefix
RUST
, which includes e.g. ourRUST_STABLE_VER
. So even if the key was derived using the CI runner's pre-installed old Rust toolchain, our env variable prevented most conflicts.The cache docs also state that it does not cache, by cleaning the following:
As we were installing the toolchain after the cache action, the potential for caching the toolchain seems there. However the cache size hasn't changed after this ordering change. Perhaps it does a simple path check only and the pre-installed toolchain was in the same path.
In any case, better to invoke the cache action after the toolchain has been installed, as the docs suggest.