-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Is your request related to a problem? Please describe.
The build takes a long time...
Describe the solution you'd like. What packages do you want installed?
ccache can prefix a compiler command and caches the final compiled target in ${HOME}/.ccache. This is separate from make's checks on if source files are newer than the built targets in the build directory so you could do a clean build and still see performance improvements. ccache prints the same compiler warnings and produces the same final object file just without having to do the full compilation, saving time.
We could incorporate ccache into the ldmx-sw CMakeLists.txt with something like
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
endif()And we could maybe incorporate cacheing ccache's cache in GitHub actions so that the CI doesn't have to re-compile all the same stuff.
The Development Image is based on Ubuntu 24.04. How do you install your necessary packages on Ubuntu?
apt-get install ccache
Downside
Since we are operating within a container, we do not benefit from ccache being applied to different directories on the system, but we would still benefit when switching branches and whatnot.