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