Skip to content

Commit d584f70

Browse files
committed
CI: rfl: add a rustfmt run
This change will also remove the current warnings in the build due to `rustfmt` not being available (for `bindgen` output): error: 'rustfmt' is not installed for the custom toolchain 'local'. note: this is a custom toolchain, which cannot use `rustup component add` help: if you built this toolchain from source, and used `rustup toolchain link`, then you may be able to build the component with `x.py` Failed to run rustfmt: Internal rustfmt error (non-fatal, continuing) Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent 824397d commit d584f70

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/ci/docker/scripts/rfl-build.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ set -euo pipefail
44

55
LINUX_VERSION=4c7864e81d8bbd51036dacf92fb0a400e13aaeee
66

7-
# Build rustc, rustdoc, cargo and clippy-driver
8-
../x.py build --stage 2 library rustdoc clippy
7+
# Build rustc, rustdoc, cargo, clippy-driver and rustfmt
8+
../x.py build --stage 2 library rustdoc clippy rustfmt
99
../x.py build --stage 0 cargo
1010

1111
# Install rustup so that we can use the built toolchain easily, and also
@@ -90,3 +90,10 @@ make -C linux LLVM=1 -j$(($(nproc) + 1)) CLIPPY=1 \
9090
samples/rust/rust_print.o \
9191
drivers/net/phy/ax88796b_rust.o \
9292
rust/doctests_kernel_generated.o
93+
94+
# Format the code
95+
#
96+
# This returns successfully even if there were changes, i.e. it is not
97+
# a check.
98+
make -C linux LLVM=1 -j$(($(nproc) + 1)) \
99+
rustfmt

0 commit comments

Comments
 (0)