getsolus / solbuild

The Solus package build system
https://getsol.us
Apache License 2.0
19 stars 12 forks source link

Start sccache server when ccache is enabled #93

Closed silkeh closed 5 months ago

silkeh commented 5 months ago

Start the sccache server so it is ready to be used by tools like Cargo. This is a workaround for an issue where builds hang until the sccache server exits, see #87.

GZGavinZhao commented 5 months ago

Looks good to me! Only one thing I need to test: occasionally a compilation may take sooooooo long that sccache shuts itself down before the compilation can complete. This can be fixed by setting the SCCACHE_IDLE_TIMEOUT environment variable to a desired amount (documented here). I'm not sure if this environment variable must be specified before the startup of the server to take effect or if it is decided on an individual compilation basis.

silkeh commented 5 months ago

@GZGavinZhao: Thanks! I have set the SCCACHE_IDLE_TIMEOUT for the process to 0 to ensure that it works as we would like, and verified that it doesn't exit by itself within 1 hour.