getsolus / solbuild

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

Integrate sccache #15

Closed GZGavinZhao closed 2 years ago

GZGavinZhao commented 2 years ago

Fixes #14.

Integrate sccache into solbuild. This will make Rust builds much faster and saner. ccache is not replaced and still being used for caching C/C++ builds.

Initial testing has been completed (with locally modified ypkg, see getsolus/ypkg#26) and the results are promising. bottom, a 211-job Rust project, can be reduced from 4 minutes and 5 seconds to 2 minutes and 18 seconds. This result is not considering that both take about a minute to fetch the crates.io index.

A final testing is needed after both sccache and ypkg are updated in the official repository.

Signed-off-by: Gavin Zhao git@gzgz.dev

GZGavinZhao commented 2 years ago

Actually, now that I think about it, it doesn't matter which order solbuild and ypkg are synced. If ypkg is first synced, then cache will be cleaned on every build; if solbuild is first synced, then caching won't happen because ypkg is the one that triggers caching. Either way, Rust builds can still run without problems.