8000 Cache does not seem to work for github-actions/setup-all, anchor-cli-Linux-v0003-0.31.1 cache key · Issue #6 · solana-developers/github-actions · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Cache does not seem to work for github-actions/setup-all, anchor-cli-Linux-v0003-0.31.1 cache key #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
borisnieuwenhuis opened this issue Apr 29, 2025 · 2 comments

Comments

@borisnieuwenhuis
Copy link

I do 3 runs with the test workflow

  1. https://github.com/borisnieuwenhuis/hello_solana3/actions/runs/14668874958/job/41170441776
  2. https://github.com/borisnieuwenhuis/hello_solana3/actions/runs/14669577585/job/41347237567
  3. https://github.com/borisnieuwenhuis/hello_solana3/actions/runs/14669571981/job/41335419591

In the first run the run-tests takes 3 mins and 8 secs
In the second and third run it takes 55 seconds
So it looks like caching works there.

The setup-all step keeps taking around 7 minutes and 40 seconds, even though there are cache key messages there
e.g. in the first run

Cache not found for input keys: solana-Linux-v0001-2.1.0
Cache key being used: solana-Linux-v0001-2.1.0

and in the second run

Cache hit for: solana-Linux-v0001-2.1.0
Cache restored successfully
Cache restored from key: solana-Linux-v0001-2.1.0

and

Cache key being used: anchor-cli-Linux-v0003-0.31.1
Cache not found for input keys: anchor-cli-Linux-v0003-0.31.1

After that the second run starts to build anchor and that takes a lot of time.
So somehow there is no cache in the second run for the key anchor-cli-Linux-v0003-0.31.1,
while for Solana-Linux-v0001-2.1.0 the cache is there.
Because anchor-cli-Linux-v0003-0.31.1 is not there it is still slow,
because it looks like anchor-cli installation takes a long time.

@borisnieuwenhuis borisnieuwenhuis changed the title Cache does not seem to work for github-actions/setup-all Cache does not seem to work for github-actions/setup-all, anchor-cli-Linux-v0003-0.31.1 cache key Apr 29, 2025
@Woody4618
Copy link
Collaborator
Woody4618 commented Apr 30, 2025

Looks like your runs are on different branches and one failed. Cache is only saved after a successful run. So if you run the same tests two times in a row it should work.
Here you can see a few runs: https://github.com/Woody4618/anchor-github-action-example/actions/workflows/anchor_test.yaml

The one with the cargo update tool 8 mins all the ones after only about 1.

Please try again running yours.

@Woody4618
Copy link
Collaborator

Please reopen this if its still an issue for your after you reran your tests a second time. Closing for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0