From 323d32792a5aaaf28cffe680501754ca2a6d3826 Mon Sep 17 00:00:00 2001 From: Peter Goodspeed-Niklaus Date: Thu, 19 Dec 2024 17:16:32 +0100 Subject: [PATCH] parallelize independent checks --- .github/workflows/rust.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 80542eafdc..18b8129b9d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,4 +1,4 @@ -name: Rust compile & test +name: Rust concurrency: group: "${{ github.workflow }}-${{ github.ref }}" @@ -30,6 +30,21 @@ jobs: check: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tool: + - name: fmt + trailer: --all -- --check + - name: clippy + trailer: -- -D warnings + - name: check + trailer: --tests + target: ["", "--target wasm32-unknown-unknown"] + exclude: + - {tool: {name: fmt}, + target: "--target wasm32-unknown-unknown"} + steps: - uses: actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1 # this implicitly caches Rust tools and build artifacts @@ -37,11 +52,7 @@ jobs: components: rustfmt, clippy rustflags: '' target: wasm32-unknown-unknown - - run: cargo fmt --all -- --check - - run: cargo clippy -- -D warnings - - run: cargo clippy --target wasm32-unknown-unknown -- -D warnings - - run: cargo check --tests - - run: cargo check --tests --target wasm32-unknown-unknown + - run: cargo ${{ matrix.tool.name }} ${{ matrix.target }} ${{ matrix.tool.trailer }} test: runs-on: ubuntu-latest