sntioudis / papreca

PAPRECA hybrid off-lattice kinetic Monte Carlo/molecular dynamics (kMC/MD) simulator
GNU General Public License v2.0
6 stars 0 forks source link

Tests: cache lammps? #7

Closed liamhuber closed 4 months ago

liamhuber commented 4 months ago

A non-blocking issue for https://github.com/openjournals/joss-reviews/issues/6714

Since half your test time is going to building lammps, you may wish to consider caching the built executable. Just remember to include the commit hash at the head of the release branch you're cloning in the cache key -- then if release has been updated the key will be new and you can fail your cache hit and correctly re-build lammps.

Disclaimer: I haven't ever tried caching a built executable. I hope it will be as easy as caching the compiled binary, and I'd start by simply trying that, but it's possible some linked libraries will sink you. As long as you're accessing the cache on the same runner (OS and OS version), I am cautiously optimistic it will work OK.

sntioudis commented 4 months ago

The Github workflow file now caches a LAMMPS executable and a LAMMPS library from the latest release branch. The commit hash is used to determine if the cached files require an update. The cached files are used to compile the papreca and source_tests executables.

liamhuber commented 4 months ago

Beautiful, 35s to restore vs 10min to build from scratch!