Skip to content

Commit

Permalink
parallelize independent checks
Browse files Browse the repository at this point in the history
  • Loading branch information
coriolinus committed Dec 19, 2024
1 parent 3b5b211 commit 9cc68b3
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rust compile & test
name: Rust

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
Expand Down Expand Up @@ -30,18 +30,28 @@ jobs:

check:
runs-on: ubuntu-latest
strategy:
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
with:
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
Expand Down

0 comments on commit 9cc68b3

Please sign in to comment.