php / php-sdk-binary-tools

Tool kit for building PHP under Windows
BSD 2-Clause "Simplified" License
85 stars 32 forks source link

tar.exe breaks actions/cache #3

Open codemasher opened 1 year ago

codemasher commented 1 year ago

The included tar.exe causes actions/cache to break on the Windows-2022 runner in case it is added to the path. As a temp fix, i renamed it during the workflow, but updating tar.exe (and perhaps the other binaries) is advised.

cmb69 commented 1 year ago

Hmm, on my local machine:

D:\Users\cmb>ver

Microsoft Windows [Version 10.0.19043.2130]

D:\Users\cmb>tar --version
bsdtar 3.5.2 - libarchive 3.5.2 zlib/1.2.5.f-ipp

So apparently, Microsoft ships bsdtar as tar.exe, while we currently ship tar 1.32 and could update to 1.34 at best. I have some doubts that this will resolve the issue. An option might be not to ship tar.exe at all, or to do the same aliasing (we currently ship bsdtar 3.3.3, but could update to 3.6.1). The former might cause issues for those relying on tar (maybe using an older Windows, or requiring original tar); the latter looks generally doubtful to me. :(

codemasher commented 1 year ago

Wait, now that you mention it, there is another tar.exe in C:\Program Files\Git\usr\bin:

The cache action will use GNU tar instead of bsd tar on Windows. This should work on all Github Hosted runners as it is. For self-hosted runners, please ensure you have GNU tar and zstd installed.

https://github.com/actions/cache/blob/main/workarounds.md#improving-cache-restore-performance-on-windowsusing-cross-os-caching

ericklove8e5 commented 1 year ago