Skip to content

Commit

Permalink
ci: use matrix to run checks in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
sparten11740 committed Jul 7, 2024
1 parent 8106f39 commit a99ab6a
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,25 @@ concurrency:
cancel-in-progress: true

jobs:
lint:
name: Lint
check:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: Lint
cmd: |
cargo clippy -- -Dwarnings
cargo fmt --all -- --check
- name: Build
cmd: |
cargo build
cargo build --examples
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
save-always: true
path: |
~/.cargo/bin/
~/.cargo/registry/index/
Expand All @@ -33,9 +45,5 @@ jobs:
components: clippy, rustfmt
- name: Install system libs
run: sudo apt-get install libasound2-dev libudev-dev pkg-config
- name: Lint
run: cargo clippy -- -Dwarnings
- name: Build (examples)
run: cargo build --examples
- name: Check format
run: cargo fmt --all -- --check
- name: ${{ matrix.name }}
run: ${{ matrix.cmd }}

0 comments on commit a99ab6a

Please sign in to comment.