Setting up CI for Rust with Github Actions is pretty easy, but there are a few gotchas.
This post will walk through setting up a basic CI pipeline for a Rust project, cross-compile to ARM, and build a Docker image.
I like to deploy hobby-projects on ARM as it is usually cheaper, and I have a Macbook so there's less cross-compilation to do.
We'll follow a pattern of building Rust, and then copying the binary into a Docker image. There are other patterns, such as building inside Docker using multi-stage builds, but there are unresolved issues with caching. This way is simpler, and works well.