CI+Toolchain: Update to actions/cache@v3 and simplify BuildIt.sh
#19094
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.
CI: Update
actions/cacheto v3This version now natively supports read-only caches (
cache/restore@v3)so we no longer need to pin the version to a commit in actions/cache#489
which is an unmerged PR.
The update is mostly mechanical:
CACHE_SKIP_SAVEnot set can use the plaincache@v3action.
CACHE_SKIP_SAVEset to a constanttrueare changed tocache/restore@v3.to a pair of
cache/restore@v3andcache/save@v3. This setup isused for the large (100s of MB) ccache and Toolchain caches. As caches
saved in pull requests can only be utilized from within the same PR,
uploading these would only waste time and our storage quote.
Therefore, we skip the
savesteps if running on a PR.Toolchain+CI: Remove cache handling logic from BuildIt.sh
Instead of manually compressing/decompressing a toolchain tarball if
TRY_USE_LOCAL_TOOLCHAINis set, let's use the cache action's automaticbuilt-in compression (which is zstd, I believe).