pierr3 / TrackAudio

A next generation Audio-For-VATSIM ATC Client for macOS, Linux and Windows
Other
49 stars 11 forks source link

Add caching to the github workflows #189

Open neilenns opened 3 weeks ago

neilenns commented 3 weeks ago

Fixes #185

Our github workflows take around 30 minutes to build right now. This is because of four slow parts:

There's also an additional unnecessary npm install step that, while short, does add some time that could be saved and was removed.

This PR adds caching for all of those items:

This cuts the build time down from 30 minutes to around 2 minutes for mac and linux and 3 minutes for windows (which is always slower for some reason).

neilenns commented 3 weeks ago

afv-native is now cached based on the submodule SHA and a hash of all files under backend/. Additionally, it is only cached for the CI build, not the release build. The first build of any PR will do a full build of afv-native, but subsequent builds of the same PR will only rebuild if the cache misses.

There's still something not working right with the electron-builder cache on linux and windows. It's restoring the cache but still downloading the files. This doesn't happen on macos and windows. I'll look into it more later.

Caches are visible at https://github.com/pierr3/TrackAudio/actions/caches if they ever need to be nuked.

neilenns commented 4 days ago

This now handles the new libuiohook native dependency.