Add rustfmt check to workflow.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-05-01 11:45:31 +00:00
parent 268af403d6
commit 3dde48f503
6 changed files with 61 additions and 4 deletions

View File

@@ -0,0 +1,23 @@
# syntax = docker/dockerfile:1.11-labs
FROM input AS cargo
ARG sys_target
ARG rust_toolchain="nightly"
ARG RUSTUP_HOME
ARG CARGO_HOME
ARG fmt_args=""
WORKDIR /usr/src/tuwunel
RUN \
--mount=type=cache,dst=${RUSTUP_HOME},sharing=locked \
--mount=type=cache,dst=${CARGO_HOME},sharing=locked \
<<EOF
env
set -eux
rustup run ${rust_toolchain} \
cargo fmt \
--all \
--check \
--manifest-path Cargo.toml \
${fmt_args}
EOF