From 6dd8f5d33bfe5f12ab1fb0aa8f5840c2f37f37ab Mon Sep 17 00:00:00 2001 From: Jones Beach <165730713+JonesBeach@users.noreply.github.com> Date: Tue, 12 Nov 2024 17:50:36 -0500 Subject: [PATCH] Update rust.yml --- .github/workflows/rust.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 696ca02..b05a6bf 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,16 +13,24 @@ jobs: build: runs-on: ubuntu-latest + + strategy: + matrix: + # Each feature flag combination. GitHub will run these in parallel because magic. + features: + - "" + - "async_mode" + - "use_dependencies" + - "async_mode use_dependencies" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup protoc uses: arduino/setup-protoc@v2.0.0 - - name: Build - run: cargo build --verbose - - name: Test - run: cargo test --verbose - - name: Test async mode - run: cargo test --features async_mode --verbose - - name: Test with third-party libs - run: cargo test --features use_dependencies --verbose + - name: Run tests + run: | + if [ -z "${{ matrix.features }}" ]; then + cargo test --verbose + else + cargo test --verbose --features "${{ matrix.features }}" + fi