Skip to content

Commit 1b004e8

Browse files
maybeeclvpx
andauthored
Update tips-and-workarounds.md
Co-authored-by: Lovepreet Singh <[email protected]>
1 parent 75b110b commit 1b004e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tips-and-workarounds.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ Reusing cache across feature branches is not allowed today to provide cache [iso
2323
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:
2424
- Only cache those files which are compatible across OSs.
2525
- Caching symlinks might cause issues while restoration as they work differently on different OSs.
26-
- Only cache files, which are within your github workspace directory. Don't try to use directory pointer like `${{ github.workspace }}` or `~` (home) eventually being evaluated to an absolute path, as the paths will not match the setup across OSs.
26+
- Only cache files from within your github workspace directory.
27+
- Avoid using directory pointers such as `${{ github.workspace }}` or `~` (home) which eventually evaluate to an absolute path and will not match across OSs.
2728

2829
## Force deletion of caches overriding default cache eviction policy
2930
Caches have [branch scope restriction](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache) in place. This means that if caches for a specific branch are using a lot of storage quota, it may result into more frequently used caches from `default` branch getting thrashed. For example, if there are many pull requests happening on a repo and are creating caches, these cannot be used in default branch scope but will still occupy a lot of space till they get cleaned up by [eviction policy](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy). But sometime we want to clean them up on a faster cadence so as to ensure default branch is not thrashing. In order to achieve this, [gh-actions-cache cli](https://github.com/actions/gh-actions-cache/) can be used to delete caches for specific branches.

0 commit comments

Comments
 (0)