Open mwestphal opened 5 months ago
@CharlesGueunet
@pierre-guillou
Hi @mwestphal,
I'm the one that put these workflows into place. I used ccache
on Ubuntu & macOS because at that time (3 years ago) I thought it was the simplest solution.
Note that we use sccache
on Windows (it was quite a pain to make it work with CMake + clang-cl for OpenMP…). We stuck to an old version of sccache
there to avoid a bug but I haven't tried with newer versions yet.
I decided to use GitHub releases to store ccache/sccache data for several reasons:
So I came up (in several iterations) with the current system that (mis)uses GitHub Releases to store ccache/sccache data at every commit / PR merge in the main repository.
Do you think the current action/cache
supports these uses-cases?
We can switch from ccache
to sccache
in the Ubuntu & macOS jobs but sccache
seems a bit more intrusive with its --start-server
& --stop-server
invocations. Is there any sccache
feature that makes it more attractive than ccache
?
Thanks for your answer.
I didn't want PRs have a write access to the cache, only a read access
Great, github cache behave the same
I wanted a centralized cache accessible to other repositories, in case developpers want to test their code in their fork without creating a PR to the main TTK repository
Great github cache behave the same
GitHub cache action did not seem to work well across different branches/PRs.
It works perfectly actions branches, forks and PRs. It is designed by github for github users to do exactly that.
Do you think the current action/cache supports these uses-cases?
Yes
Is there any sccache feature that makes it more attractive than ccache?
Windows support
I hope that answers your questions. I cann explain how it works in F3D ci if needed. Maybe I'm missing something regarding TTK needs but so far I do really thing that github cacches + sccache works wonders.
BTW I'm thinking of adding a sccache github action that could be used out of the box, I'll let you know If I do that.
Hi TTK!
I see that your CI is starting to use ccache, that's great! However, I see that you started using release to store the caches themselves, I dont think this is the easiest nor the most efficient way to it.
Also, ccache is linux specific, while sccache supports all OSes.
Over at F3D we are using sccache and cache github actions to handle our cache with success and great compilation speedup.
It is done like this:
Full CI is here: https://github.com/f3d-app/f3d-superbuild/blob/main/.github/actions/f3d-superbuild/action.yml#L46
I dont have enough bandwidth to take care of this myself but I'd be happy to explain how it works and why I think this would provide better feature than the solution currently being implemented :)
hth