Skip to content
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

Any idea why ccache not working for this publish-docker workflow (but it does for this other unixlike-builds CI workflow)? #108

Open
rturrado opened this issue Oct 17, 2022 · 11 comments

Comments

@rturrado
Copy link

Hi!

I believe I'm following exactly the same steps in these two workflows:
https://github.com/rturrado/the_modern_cpp_challenge/tree/unixlike-builds/.github/workflows

  • Running on an ubuntu-22.04 runner.
  • Updating, upgrading, installing gcc 12.
  • Checking out my repository.
  • ...
  • Setting up ccache with a key named after the job name.

However, ccache works in one of the workflows:
https://github.com/rturrado/the_modern_cpp_challenge/actions/runs/3264947175/jobs/5366385462
(see step ccache / Restore cache).

But not in the other:
https://github.com/rturrado/the_modern_cpp_challenge/actions/runs/3264957407/jobs/5366408088

Thanks!

@jonashaag
Copy link
Contributor

What exactly does it mean to "not work" in this case? The second seems to save the cache so that looks like it's "working".

@rturrado
Copy link
Author

If you see the step ccache / Restore cache, it always says No cache found.. Even if, as you correctly say, it was saved before (and I'm not changing any source file, just yaml files, READMEs, and so on).

@rturrado
Copy link
Author

I think this "issue" may be related, if not the same, to this other: docker/build-push-action#433

They say there that pushing to a new tag doesn't use the existing cache.
Whereas deleting the previous tag, and pushing again to the previous tag uses the existing cache.

@jonashaag
Copy link
Contributor

Can you please link to two subsequent GHA runs that show this behaviour? So far we‘ve only seen a single one that populates the cache.

@jonashaag
Copy link
Contributor

The commits were made on two different branches. They do not share caches by GHA design. Did you expect a cache from master/main to be used in one of the builds?

@rturrado
Copy link
Author

All the work I'm doing lately is on the unixlike-builds branch. I first do a git push, what triggers the unixlike-builds CI workflow, and then a git tag TAG && git push origin TAG, which triggers the publish docker workflow. The two links above correspond to successive runs of the publish docker workflow.

@jonashaag
Copy link
Contributor

Hm you're right, something is not working here. Is your repository reaching the cache size limit?

@rturrado
Copy link
Author

I don't believe so. Cache is being saved successfully. It's taking 51MB out of a 500MB max size. Have a look at the first link again:

  • ccache step:
Run hendrikmuhs/ccache-action@v1.[2](https://github.com/rturrado/the_modern_cpp_challenge/actions/runs/3260925998/jobs/5354957848#step:8:2)
  with:
    key: publish-docker
    max-size: 500M
  • Post ccache step:
Cache Size: ~51 MB (53124898 B)
Cache saved successfully

@jonashaag
Copy link
Contributor

I was wondering about repository level cache limit, but honestly that's just a last straw, I really have no ideas left :(

@rturrado
Copy link
Author

@jonashaag many thanks for you attention anyway!

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