Add ccache to ci
Currently, the build stage (for the RPMs) takes a bit more than 6 minutes, because it needs to build the entire project from scratch each time. We could potentially reduce this part quite a bit by using ccache in our GitLab runners.
Of course, caching always comes with some risks, but ccache appears to be relatively safe. That said, if we decide to add this, then we should:
- have a nightly job that builds without the cache,
- periodically clear the cache.
ccache is already supported by the build scripts. Additionally, GitLab already has existing support for caching.
The question is: is it worth it to add this to our pipelines? Primarily in terms of potential caching risks; adding this should be very easy.
That said, it should cut down some time from the pipelines (I estimate somewhere between 2 to 3 minutes), with this benefit only growing as the project grows. This in turn speeds up the development time.