Build once per platform & use ccache
See if we can speed up builds by caching meson build dir
It looks like it's successful at restoring the cache, but it's not faster to build. It still counts from 1 to 165. Is it using the cache?
In retrospect, sorry for suggesting caching the build folder! I was just interested in the idea of caching the build, but knew I didn't know how to do it.
Timestamps may be a problem. Not sure meson cache is meant to be restored like this.
Could ccache be another option (in case you haven't thought of it already)?
Yes, that's what I realized we'd have to do! You can't cache meson this way because of timestamps.
We should not be building N times for a given Python version on a given platform. Build once, test several configurations?
What configurations do you have other than different platforms/Python versions? Different versions of other dependencies?
(That said, this will already be a huge improvement, so besides getting the cache working, optimizations could be a follow-up.)
For any given platform, we build with a known set of dependencies. But, you're right, that can be a secondary optimization.
It doesn't look like ccache helped here :thinking:
OK, the caching is roughly working. Takes a build down from ~4.5mins to ~1min. Will need to adjust the CI a bit, because looks like the caching is too granular. E.g., the pre-build still rebuilds from source, despite having access to a cache (hits: <2%).