From cd8d3b8e7cb7b831c1e9dd3326f47ca5d6427901 Mon Sep 17 00:00:00 2001 From: GnomedDev Date: Thu, 1 Aug 2024 17:12:55 +0100 Subject: [PATCH] Add proper CI for clippy --- .github/workflows/ci.yaml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 589d696..1a927c9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,18 +12,28 @@ on: # Also on PRs, just be careful not to publish anything pull_request: - jobs: - ci: - runs-on: ubuntu-22.04 + library-ci: + runs-on: ubuntu-latest + strategy: + matrix: + subcmd: [build, clippy, test] + steps: - uses: actions/checkout@v4 - - name: Build - run: cargo check + - name: Run `cargo ${{ matrix.subcmd }}` for library + run: cargo ${{ matrix.subcmd }} + + example-ci: + runs-on: ubuntu-latest + strategy: + matrix: + example: [embassy, blocking, tokio, nrf52] - - name: Test - run: cargo test -- --nocapture + steps: + - uses: actions/checkout@v4 - - name: Build examples - run: for i in embassy blocking tokio nrf52; do pushd examples/$i; cargo build; popd; done; + - name: Run `cargo build` for example ${{ matrix.example }} + working-directory: examples/${{ matrix.example }} + run: cargo build