Enable ccache in GitHub Actions
Intro
Currently our CI builds take ~15-20 minutes, and we're planning to add more jobs.
I suspect that we could speed up them significantly by employing ccache and preserving cache between builds.
Our builds include building third-party dependencies, like sox and pulseaudio. They are built many times because we check builds on many environments (different Linux distros, different macOS versions, etc). Most of the time the results of building a dependency on some fixed environment are identical because we change versions and options of dependencies very rarely.
Steps
-
Check if scons will work with
ccachesmoothly. I hope that just exporting corresponding variables would be enough, but maybe we'll have to fix some issues. -
Enable
ccachein CI builds. -
Preserve
ccachedirectory between builds.
Documentation
Ccache: https://ccache.dev/
Roc:
Hello, I'm a beginner. I would love to give this a try. Just need a little more clarification and help. Here's what I have so far -
- scons supports ccache integration
- 3rd party dependencies build results are stored in
./3rdparty/<host>/rpath
@Ring-A-Bell Hi, feel free to ask if you have specific questions ;)
Enabling SCons cache maybe an easier way out https://github.com/godotengine/godot/pull/13299
@abitrolly Sounds interesting, but the main purpose is to cache builds of 3rd-parties, which don't use scons. And using ccache would be a universal solution, it would cache both 3rd-parties and roc.
I've added ccache support to scons. I'll create a new issue for using ccache in CI.