jrheard / rask

overengineered personalized-to-me taskwarrior replacement
MIT License
0 stars 0 forks source link

tweak github actions setup so that docker layers are cached better #8

Open jrheard opened 3 years ago

jrheard commented 3 years ago

right now docker builds take ~5 minutes, and no layers are cached except the layers from the last stage, which don't save us any time. cargo-chef and buildx's gha caching are supposed to do nice caching things, but they don't seem to be doing that in this setup right now.

one possible theory: maybe cargo-chef is violating some assumptions of buildx's caching? maybe buildx only caches the final layer intentionally for some reason? no clue.

jrheard commented 3 years ago

the situation is even worse now that i changed docker-compose-test to build its own rask_api image. the gha docker image layer caching story is evolving and not super great atm. we need to cache built deps/layers across these three situations:

right now i don't think there's working caching for any of those steps :)

jrheard commented 3 years ago

thought about this a bit more, here's a sketch of a possible direction:

so in my head the main github action workflow would end up looking something like this:

yeesh. that sounded simpler in my head.

jrheard commented 3 years ago

TODO: see what other projects do!!!