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
Description:
The cache keys are currently node-cache-Linux-npm-<hash> which does not seem to include the CPU architecture so if npm dependencies include native binaries and the same cache is restored on a different architecture than what it was built on, these binaries would fail to run.
Action version:
4
Platform:
All
Runner type:
All
Tools version:
All
Repro steps:
Build a cache on a x86 runner
Restore cache on a ARM runner
Expected behavior:
Cache key should include architecture
Actual behavior:
Cache key does not include architecture
The text was updated successfully, but these errors were encountered:
Can the same be done for Node version as well? If you set up a matrix that runs the same workflow on both e.g. Node 16 and 18, and you have packages like jsdom or canvas which get compiled for a particular Node version like Automattic/node-canvas#1410 , wouldn't the same cache be downloaded for both Node 16 and Node 18, thus causing the linked error?
Yes, different node major version have different ABI versions, so I would recommend including node major version in the cache key. Minor/patch versions should be strictly ABI compatible. Also see https://nodejs.org/en/learn/modules/abi-stability.
Description:
The
cache
keys are currentlynode-cache-Linux-npm-<hash>
which does not seem to include the CPU architecture so if npm dependencies include native binaries and the same cache is restored on a different architecture than what it was built on, these binaries would fail to run.Action version:
4
Platform:
All
Runner type:
All
Tools version:
All
Repro steps:
Expected behavior:
Cache key should include architecture
Actual behavior:
Cache key does not include architecture
The text was updated successfully, but these errors were encountered: