https://abhinavsarkar.net/posts/fast-haskell-scripts-on-github-actions/
Thanks for writing this blog post. I’m always inspired by whatever solutions ppl come up with in regard to caching in CI.
In the beginning you mentioned choosing magix because cold starts are slow with nix-shell. But then at the end you show some cold start number with magix of >1m. Was the cold start without magix even longer for you?
Btw I solved some similar caching issue with direnv by caching its direnv export bash output once for the CI build as an artifact and then sourcing that artifact everywhere else.
Thanks! Cold start without Magix, using only Nix shell, was about 1:15 minutes. So it was faster than Magix cold start at 1:45 minutes. I thought that if I could cache the compiled executable with its dependencies, it should be much faster than either of the cold starts, and as the post shows, it was, at 0:15 minutes.
The idea of using direnv export never occurred to me. I think it is brilliant. I’ll try it out and see how it compares to my approach.