3 ms·
I've spent some time to deploy shared ccache for our Azure Devops PR builds as well as locally. The 1 hour build time went down to 5 minutes for release, about
by dragoncrab 4y ago
I've spent some time to deploy shared ccache for our Azure Devops PR builds as well as locally.
The 1 hour build time went down to 5 minutes for release, about 9 for debug. It took another 2-3 minutes to download/upload the shared ccache, so it's still a good 6 time speedup, not to mention that it takes much less CPU.
The trick is to set --fdebug-prefix-map and -fprofile-dir to proper relative paths and then with some extra scripting caches will be reusable across build nodes even if the workspace directory is different for each build.
This and distcc (or IncrediBuild) are a game changer for every serious C++ workshop.
- choeger 4y agoIf you like distcc, did you ever give icecc a try? https://github.com/icecc/icecream https://github.com/icecc/icecream I never had the time to set it up properly, but by the looks of it, it should be even better.
- MuffinFlavored 4y ago> The 1 hour build time went down to 5 minutes for release, about 9 for debug. I kind of one in the future if there will be a publicly trustable, free to use "just plug and play, you don't need to set up your own" ccache Think of the energy savings implications Imagine every unoptimized build job for every microservice (Rust in Docker pulls the entire Cargo registry + rebuilds all dependencies every time you make a source code change of any kind if you don't go out of your way to prevent it) Obviously trusting a public source to just compile something for you and give you a binary-like object is... probably a malware distributor's dream. And I don't have data to prove the bandwidth cost would offset the energy savings of CPU cycles recalculating the same stuff over and over. Interesting though...
- nerdponx 4y agoYou mean like using IPFS for compilation caching? Or something else secure and content-addressable.
- zulu-inuoe 4y agoIf I hadn't used it at work at a large C++ shop, I'd never have stumbled upon how great Incredibuild is