@@ -21,6 +21,9 @@ matrix:
rust:
language: bash
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
+ - env: RUSTFMT=1
+ rust: stable
+ if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
install:
@@ -12,3 +12,7 @@ if [ -n "${CHECK_BLOBS:-}" ]; then
curl -L https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.1.0-2018.12.0-x86_64-linux-ubuntu14.tar.gz | tar --strip-components=1 -C gcc -xz
fi
+
+if [ -n "${RUSTFMT:-}" ]; then
+ rustup component add rustfmt
+fi
@@ -18,3 +18,7 @@ if [ -n "${CHECK_BLOBS:-}" ]; then
PATH="$PATH:$PWD/gcc/bin"
./check-blobs.sh
+ cargo fmt -- --check