MHeasell / rwe

Robot War Engine - Real-time strategy game engine compatible with Total Annihilation
https://www.robotwarengine.com/
GNU General Public License v3.0
115 stars 16 forks source link

github actions build too long - not using cached protobufs #171

Closed KevinHake closed 10 months ago

KevinHake commented 10 months ago

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.

KevinHake commented 10 months ago

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.