Skip to content

Caching with setup-go slower than latest actions/cache #372

@pkwarren

Description

@pkwarren

Description:
While testing the caching of this action, I found that the actions/setup-go cache performs worse than the same cache created with the latest version of actions/cache. I believe this is due to the fact that the latest actions/cache now uses zstd instead of tgz as the default format.

I believe this is due to actions/setup-go pinning an older version of actions/cache:

"node_modules/@actions/cache": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.0.0.tgz",

For comparison:

setup-go (1m13s):

C:\Windows\System32\tar.exe --posix -z -cf cache.tgz --exclude cache.tgz -P -C D:/a/buf/buf --files-from manifest.txt

cache (39s):

"C:\Program Files\Git\usr\bin\tar.exe" --posix -cf cache.tzst --exclude cache.tzst -P -C D:/a/buf/buf --files-from manifest.txt --force-local --use-compress-program "zstd -T0"

Action version:
Specify the action version: v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
1.20.3

Repro steps:
Create a workflow which both uses the default actions/setup-go cache and an actions/cache step which backup the same paths.

Expected behavior:
Performance should be equivalent for both.

Actual behavior:
Performance of actions/setup-go is much slower.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions