-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Hi,
we've noticed some inconsistencies with how cache behaves with setting enableCrossOsArchive to true:
- cache created on Windows can be restored on Linux
- cache created on Linux cannot be restored on Windows
I suspect that this might be related to the compression method that's being used as it's also included in the cache file path. Linux uses zstdmt for compression but Windows uses zstd -T0 command.
// actions/toolkit/packages/cache/src/internal/tar.ts // getCompressionProgram() does NOT receive enableCrossOsArchive parameter return ['--use-compress-program', IS_WINDOWS ? '"zstd -T0"' : 'zstdmt']
The testing was done on standard ubuntu-latest and windows-latest GitHub hosted runners.
Are you aware of the issue?
To Reproduce
Steps to reproduce the behavior:
- Cache any files on Linux runner with enableCrossOsArchive enabled
- Restore cache created on Linux on Windows runner - this step fails
Expected behavior
Cache created on Linux is restorable on Windows and the other way around.
Are you aware of this issue?