Skip to content

Commit

Permalink
CI: rfl: add a rustfmt run
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ojeda committed Aug 27, 2024
1 parent 824397d commit d584f70
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/ci/docker/scripts/rfl-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -euo pipefail

LINUX_VERSION=4c7864e81d8bbd51036dacf92fb0a400e13aaeee

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

# Install rustup so that we can use the built toolchain easily, and also
Expand Down Expand Up @@ -90,3 +90,10 @@ make -C linux LLVM=1 -j$(($(nproc) + 1)) CLIPPY=1 \
samples/rust/rust_print.o \
drivers/net/phy/ax88796b_rust.o \
rust/doctests_kernel_generated.o

# Format the code
#
# This returns successfully even if there were changes, i.e. it is not
# a check.
make -C linux LLVM=1 -j$(($(nproc) + 1)) \
rustfmt

0 comments on commit d584f70

Please sign in to comment.