Open rturrado opened 2 years ago
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".
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).
I think this "issue" may be related, if not the same, to this other: https://github.com/docker/build-push-action/issues/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.
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.
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?
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.
Hm you're right, something is not working here. Is your repository reaching the cache size limit?
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
I was wondering about repository level cache limit, but honestly that's just a last straw, I really have no ideas left :(
@jonashaag many thanks for you attention anyway!
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
ubuntu-22.04
runner.gcc
12.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 stepccache
/Restore cache
).But not in the other: https://github.com/rturrado/the_modern_cpp_challenge/actions/runs/3264957407/jobs/5366408088
Thanks!