Reputation: 1390
How can I setup a shared ccache without falling into a permissions problem?
I would like to run a nightly or CI build with latest changes and share all created binaries throughout the R&D using a large ccache repository.
Upvotes: 12
Views: 10368
Reputation: 904
See the newly written Sharing a cache section in ccache's manual. In essence, use the same CCACHE_DIR
setting, set CCACHE_UMASK
appropriately and consider using CCACHE_BASEDIR
.
Upvotes: 12
Reputation: 9
Please see xcache.
It's ccache-cloud and has been used in alibaba which has high efficiency.
If you are using ccache, it would be very easy to switch to xcache.
Upvotes: 0
Reputation: 15831
You might also take a look at Mozilla's sccache, which is a ccache-like tool that can store build artifacts in cloud storage (GCS/S3/Azure or redis/memcached).
Upvotes: 3
Reputation: 35169
If you also use the related distcc, then the permission problems would largely go away, as the compilations would be run under it's control on whatever compile-farm hosts you set.
You could also include the developers desktop machines among the distcc hosts, though at the expense of having some duplicated work where a file would potentially be compiled on more than one machine - though it would never return an out of date compiled object file. It would also speed up day to day recompilations.
Upvotes: 0
Reputation: 24574
The easiest solution: create a new group (e.g. "devel"), and make all developers members of it. Give read/write permissions to that group on the directory hierarchy where the cache is maintained. The developers will also need to fix their umask.
Upvotes: 3