diff options
| author | Miguel Ojeda <ojeda@kernel.org> | 2024-08-10 16:47:20 +0200 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2024-08-28 01:57:16 +0200 |
| commit | d584f7099a3c17c76a38f686a9af0b1d36a686ab (patch) | |
| tree | a64553df1458daac5f2e9ccdd1b242675c03e0ed /src/ci/docker | |
| parent | 824397ddf6536664ec91ac42c6473b7cbf8844f6 (diff) | |
| download | rust-d584f7099a3c17c76a38f686a9af0b1d36a686ab.tar.gz rust-d584f7099a3c17c76a38f686a9af0b1d36a686ab.zip | |
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>
Diffstat (limited to 'src/ci/docker')
| -rwxr-xr-x | src/ci/docker/scripts/rfl-build.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ci/docker/scripts/rfl-build.sh b/src/ci/docker/scripts/rfl-build.sh index 2f9ec3c23a8..030b6f6ee17 100755 --- a/src/ci/docker/scripts/rfl-build.sh +++ b/src/ci/docker/scripts/rfl-build.sh @@ -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 @@ -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 |
