jacg / nain4

An API that makes it easier to write Geant4 application code.
https://jacg.github.io/nain4/
3 stars 3 forks source link

Configure binary cache in template #106

Open jacg opened 1 year ago

jacg commented 1 year ago

Configure binary cache with nixConfig in the template's flake. (This whole topic appears to be almost completely undocumented in Nix, but here's an example in the wild: https://github.com/divnix/digga/blob/main/examples/devos/flake.nix#L4-L14)

It seems that the template avoids compiling Geant4, I'm not sure by what mechanism. But it does seem to reduce the urgency of this item.

jacg commented 1 year ago

This will be fun to test, given that we have the cache enabled both on our development machines and in the GHA workflow. Secondly, how can we automatically verify that the cache is working.

One idea:

The length of timeout would have to grow, as we add more into the template. Annoying, fragile, but we haven't had any better idea yet.

jacg commented 1 year ago

It would also be good if the user benefited from the cache when doing something like

nix run github:joe-random-n4-user/cool-project#amazing-demo