github actions build too long - not using cached protobufs
Closed this issue · 1 comments
Seems like maybe we're not properly using cacheing for protobufs in .github/workflows/build.yml;
For both linux and MSYS builds, it looks like we restore a cached version, but then we re-build it anyway, and cache the result. I think the re-build should be conditional on if the cached copy is there.
I see caching working fine for other dependencies like nodejs, npm, and MSYS2, but we seem to handle protobufs differently.
So maybe there's a way to change build.yml so protobufs is cached more like those others, or perhaps there's something we can change so build-protobuf.sh accepts the cached copy; the logs show:
built protobuf is a different version than source
source protobuf: f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c
built protobuf:
Which suggests we're either not reading or not storing the commit hash from the cached protobufs.
In linux the re-build is using around 7min, in MSYS it's ~14min.
Never mind... I just happened to look at logs where protobufs were not cached, and I thought they were. I re-ran a recent build and it worked great. I think github clears caches if they haven't been used for 7 days.