GodotVR / godot_openxr_vendors

Godot 4 wrapper for OpenXR vendors loaders and extensions
MIT License
90 stars 19 forks source link

Use SCons and Gradle cache on CI to improve build times #189

Closed dsnopek closed 1 month ago

dsnopek commented 1 month ago

This should improve build times on all PRs, but it will have the biggest impact on PRs that only change docs or CI configuration or anything not directly code related, because it'll re-use all the build artifacts from the cache.

Here's a build with an empty cache:

Selection_181

And here's one with no changes to the code with the cache fully populated:

Selection_182

I'm not entirely sure why the Android builds still take ~6 minutes, but it's a big improvement from ~15 minutes in any case! I think it may be because Gradle is running cmake and we aren't getting any of the cmake stuff cached?

NOTE: Marking this as a draft because it includes PR https://github.com/GodotVR/godot_openxr_vendors/pull/170, which is currently necessary for the CI to pass. I'll take out of draft and rebase once that one is merged.

dsnopek commented 1 month ago

I've integrated a Gradle cache into this PR too, hoping that it would improve the Android build times, however, it only did so marginally:

Selection_186

So, only like ~30s faster. :-) I think we aren't getting the gains we should because Gradle is running cmake, and we aren't getting any of the cmake stuff cached? That's something that can probably be improved later, either by adding some cmake caching, or maybe telling Gradle about its intermediate artifacts so it can do the caching? Anyway, I think that can be saved for later.

I also noticed that we have two identical Android builds, that only capture different sets of artifacts. So, I've reduced that to one build that captures both sets of artifacts. The GodotOpenXRVendorsAddon.zip that is created still has all the same files and is the same size.

dsnopek commented 1 month ago

Rebased after PR https://github.com/GodotVR/godot_openxr_vendors/pull/170 has been merged, and so taking out of draft.