From cd613f5ab3d271325dd5f0661878836de6543b31 Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Thu, 5 Sep 2024 13:27:46 +0100 Subject: [PATCH] CI(check-codestyle-rust): use `parallel` and `cargo hack --partition` --- .github/workflows/build_and_test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 3c177640eb..da8f5fc073 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -170,17 +170,19 @@ jobs: echo "CLIPPY_COMMON_ARGS=${CLIPPY_COMMON_ARGS}" >> $GITHUB_ENV - name: Run cargo clippy (debug) - run: cargo hack --feature-powerset clippy $CLIPPY_COMMON_ARGS + run: | + parallel --jobs 8 "cargo hack --feature-powerset --partition {}/8 clippy --target-dir target/partition-{} $CLIPPY_COMMON_ARGS" ::: 1 2 3 4 5 6 7 8 # instead of running the full release build, running debug build again, # but with disabled `debug-assertions` to excersice release code paths - name: Run cargo clippy (debug, with debug-assertions=false) - run: cargo hack --feature-powerset clippy $CLIPPY_COMMON_ARGS -C debug-assertions=off + run: | + parallel --jobs 8 "cargo hack --feature-powerset --partition {}/8 clippy --target-dir target/partition-{} $CLIPPY_COMMON_ARGS -C debug-assertions=off" ::: 1 2 3 4 5 6 7 8 - name: Check documentation generation run: cargo doc --workspace --no-deps --document-private-items env: - RUSTDOCFLAGS: "-Dwarnings -Arustdoc::private_intra_doc_links" + RUSTDOCFLAGS: "-Dwarnings -Arustdoc::private_intra_doc_links" # Use `${{ !cancelled() }}` to run quck tests after the longer clippy run - name: Check formatting