Bithack / principia

Open source physics-based sandbox game.
https://principia-web.se
Other
258 stars 25 forks source link

Setup cache on GH actions #118

Closed griffi-gh closed 1 year ago

griffi-gh commented 1 year ago

Currently, gh actions builds take ~15-20 minutes to complete and we can drastically reduce that by setting up caching. (for *.o and other files) (Are there any drop-in solutions like https://github.com/Swatinem/rust-cache for C?/ if no it it can easily be implemented manally)

rollerozxa commented 1 year ago

MinGW builds already use caching for repository packages. I don't see why caching incremental builds would be useful though, Principia itself compiles fast enough.

griffi-gh commented 1 year ago

wdym github doesn't pull in anything except repo files by default

rollerozxa commented 1 year ago

er, I meant MSYS2. the MSYS2 action has built-in caching for repository packages that it will retrieve if new versions of the package aren't available from the MSYS2 repositories.

anyways, went and checked the build times for actions:

The Linux action doesn't produce any binaries currently, it's purely a sanity test to check that it compiles, so it's good that it finishes rather quickly so you can quickly see if something makes the compilation fail. Windows and Android produce binaries in addition to testing compilation, it's probably less important for them to finish quickly, they'll eventually finish or fail early if something is wrong.

griffi-gh commented 1 year ago

oh, ok that's pretty reasonable