Open jrheard opened 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:
cargo test
runright now i don't think there's working caching for any of those steps :)
thought about this a bit more, here's a sketch of a possible direction:
rask_api
image so that it can be picked up by the "start containers" stepcargo test
step happen in the context of a particular dockerfile target, rather than installing the rust toolchain and running cargo test
directly in the context of the github action workflowso in my head the main github action workflow would end up looking something like this:
yeesh. that sounded simpler in my head.
TODO: see what other projects do!!!
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.