In our C++ project, we managed to setup GitHub Actions building our sources using ccache.
It works very well on Linux where, thanks to ccache
, the build succeeds in less than 5 minutes.
Unfortunately, when trying to build on macOS, ccache
doesn't seem to work, giving:
cache directory /Users/runner/.ccache
primary config /Users/runner/.ccache/ccache.conf
secondary config (readonly) /usr/local/Cellar/ccache/3.7.11_1/etc/ccache.conf
stats updated Sun Aug 23 11:57:31 2020
cache hit (direct) 0
cache hit (preprocessed) 0
cache miss 7175
cache hit rate 0.00 %
cache file missing 1
cleanups performed 2976
files in cache 165
cache size 422.4 MB
max cache size 500.0 MB
Consequently, the macOS build takes about 40 minutes to finish.
Example of a build: https://github.com/azerothcore/azerothcore-wotlk/runs/1018358261
This is where the actions are defined: https://github.com/azerothcore/azerothcore-wotlk/blob/master/.github/workflows/core_build.yml
The entire project's source code is publicly available at: https://github.com/azerothcore/azerothcore-wotlk
So despite I've tried to setup the macOS
build the same way of the ubuntu-*
ones, I've failed to get ccache properly working and I can't figure out why.
How to make ccache
work with macOS
too?