Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@BertalanD
Copy link
Member

CI: Update actions/cache to v3

This 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:

  • Steps with CACHE_SKIP_SAVE not set can use the plain cache@v3
    action.
  • Steps with CACHE_SKIP_SAVE set to a constant true are changed to
    cache/restore@v3.
  • Steps with saving disabled when running on a pull request are changed
    to a pair of cache/restore@v3 and cache/save@v3. This setup is
    used 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 save steps 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_TOOLCHAIN is set, let's use the cache action's automatic
built-in compression (which is zstd, I believe).

BertalanD and others added 2 commits May 27, 2023 17:58
This 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:
- Steps with `CACHE_SKIP_SAVE` not set can use the plain `cache@v3`
  action.
- Steps with `CACHE_SKIP_SAVE` set to a constant `true` are changed to
  `cache/restore@v3`.
- Steps with saving disabled when running on a pull request are changed
  to a pair of `cache/restore@v3` and `cache/save@v3`. This setup is
  used 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 `save` steps if running on a PR.

Co-authored-by: Cameron Youell <[email protected]>
Instead of manually compressing/decompressing a toolchain tarball if
`TRY_USE_LOCAL_TOOLCHAIN` is set, let's use the cache action's automatic
built-in compression (which is zstd, I believe).
@github-actions github-actions bot added the πŸ‘€ pr-needs-review PR needs review from a maintainer or community member label May 27, 2023
@ADKaster
Copy link
Member

This looks right. @trflynn89 what do you think? Also did you pull that cache@v3 commit from a different PR? it looks somewhat familiar.

@BertalanD
Copy link
Member Author

Also did you pull that cache@v3 commit from a different PR?

It's loosely based on #18059, so I included @cammo1123 as a co-author on the first commit.

@ADKaster
Copy link
Member

commits merged in #19059 instead

@ADKaster ADKaster closed this May 28, 2023
@github-actions github-actions bot removed the πŸ‘€ pr-needs-review PR needs review from a maintainer or community member label May 28, 2023
@BertalanD BertalanD deleted the cache-v3 branch May 28, 2023 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants