You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use a matrix with different RUNNER_ARCHs, like macos-latest (x64) and macos-14 (M1), the jdk cache is restored but it is specific to the arch causing a cache miss.
The text was updated successfully, but these errors were encountered:
I think you're saying that the same 'java-toolchains' cache entry published from macos-latest will be restored on a later job running on macos-14. But this restored toolchain is specific to the x64 architecture and thus cannot be used on macos-14.
This would run a bit counter to the "cache entries are specific to operating system" rule that we observe with the GitHub Actions cache (#27).
I think you're saying that the same 'java-toolchains' cache entry published from macos-latest will be restored on a later job running on macos-14. But this restored toolchain is specific to the x64 architecture and thus cannot be used on macos-14.
Yes, exactly.
I will test it, but according to the docs, enableCrossOsArchive is only about Windows:
enableCrossOsArchive - An optional boolean when enabled, allows Windows runners to save or restore caches that can be restored or saved respectively on other platforms.
I also don't know, if action/cache uses RUNNER_ARCH at all, because macos-14 is the first public runner using arm, beside the private Linux/Windows beta.
A simple approach might be to simply append the RUNNER_ARCH value to the 'artifactType' for this entry: so you'd have artifactType == 'java-toolchains-x86'.
bigdaz
changed the title
Add RUNNER_ARCH to JDKs cache key
Java toolchain cache entries are not differentiated by architecture
Apr 10, 2024
If you use a matrix with different RUNNER_ARCHs, like
macos-latest
(x64) andmacos-14
(M1), the jdk cache is restored but it is specific to the arch causing a cache miss.The text was updated successfully, but these errors were encountered: