build: Move cargo fmt check to nightly toolchain via new workflow

Enforcing group_imports="StdExternalCrate" requires using cargo fmt from
the nightly toolchain. Create a new workflow that runs on nightly to run
cargo fmt.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
This commit is contained in:
Rob Bradford
2024-09-28 15:12:41 +01:00
parent f041c940a7
commit 9013d8b4ca
2 changed files with 34 additions and 8 deletions

View File

@@ -6,7 +6,7 @@ concurrency:
jobs:
build:
name: Quality (clippy, rustfmt)
name: Quality (clippy)
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
@@ -39,7 +39,7 @@ jobs:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
components: rustfmt, clippy
components: clippy
- name: Bisectability Check (default features)
if: ${{ github.event_name == 'pull_request' && matrix.target == 'x86_64-unknown-linux-gnu' }}
@@ -49,12 +49,6 @@ jobs:
for commit in $commits; do git checkout $commit; cargo check --tests --examples --all --target=${{ matrix.target }}; done
git checkout ${{ github.sha }}
- name: Formatting (rustfmt)
run: cargo fmt --all -- --check
- name: Formatting (fuzz) (rustfmt)
run: cargo fmt --all --manifest-path fuzz/Cargo.toml -- --check
- name: Clippy (kvm)
uses: actions-rs/cargo@v1
with: