1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2024-12-23 04:06:00 +01:00

Merge branch 'main' into bazel-example

This commit is contained in:
Vipul 2023-03-21 12:10:48 +05:30 committed by GitHub
commit bd9b49b6c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 9 deletions

View file

@ -2,11 +2,9 @@
This action allows caching dependencies and build outputs to improve workflow execution time. This action allows caching dependencies and build outputs to improve workflow execution time.
Two other actions are available in addition to the primary `cache` action: >Two other actions are available in addition to the primary `cache` action:
>* [Restore action](./restore/README.md)
* [Restore action](./restore/README.md) >* [Save action](./save/README.md)
* [Save action](./save/README.md)
[![Tests](https://github.com/actions/cache/actions/workflows/workflow.yml/badge.svg)](https://github.com/actions/cache/actions/workflows/workflow.yml) [![Tests](https://github.com/actions/cache/actions/workflows/workflow.yml/badge.svg)](https://github.com/actions/cache/actions/workflows/workflow.yml)

View file

@ -30,10 +30,10 @@ Reusing cache across feature branches is not allowed today to provide cache [iso
From `v3.2.3` cache is cross-os compatible when `enableCrossOsArchive` input is passed as true. This means that a cache created on `ubuntu-latest` or `mac-latest` can be used by `windows-latest` and vice versa, provided the workflow which runs on `windows-latest` have input `enableCrossOsArchive` as true. This is useful to cache dependencies which are independent of the runner platform. This will help reduce the consumption of the cache quota and help build for multiple platforms from the same cache. Things to keep in mind while using this feature: From `v3.2.3` cache is cross-os compatible when `enableCrossOsArchive` input is passed as true. This means that a cache created on `ubuntu-latest` or `mac-latest` can be used by `windows-latest` and vice versa, provided the workflow which runs on `windows-latest` have input `enableCrossOsArchive` as true. This is useful to cache dependencies which are independent of the runner platform. This will help reduce the consumption of the cache quota and help build for multiple platforms from the same cache. Things to keep in mind while using this feature:
- Only cache those files which are compatible across OSs. - Only cache files that are compatible across OSs.
- Caching symlinks might cause issues while restoration as they work differently on different OSs. - Caching symlinks might cause issues while restoring them as they behave differently on different OSs.
- Only cache files from within your github workspace directory. - Be mindful when caching files from outside your github workspace directory as the directory is located at different places across OS.
- Avoid using directory pointers such as `${{ github.workspace }}` or `~` (home) which eventually evaluate to an absolute path and will not match across OSs. - Avoid using directory pointers such as `${{ github.workspace }}` or `~` (home) which eventually evaluate to an absolute path that does not match across OSs.
## Force deletion of caches overriding default cache eviction policy ## Force deletion of caches overriding default cache eviction policy