From 3a243de8028351a6e283a68d33dbfc559ec90aa8 Mon Sep 17 00:00:00 2001 From: Olli Helenius Date: Sat, 8 Jun 2024 13:58:09 +0300 Subject: [PATCH] Run CI with all feature variants --- .github/workflows/ci.yaml | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b9f1587..70d126e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,6 +20,11 @@ jobs: matrix: rust: - stable + feature: + - rt-async-io-crypto-rust + - rt-async-io-crypto-openssl + - rt-tokio-crypto-rust + - rt-tokio-crypto-openssl steps: - uses: actions/checkout@v4 @@ -40,7 +45,7 @@ jobs: key: $clippy-cache-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }} - name: "Clippy ${{ matrix.rust }}" - run: cargo clippy --features=rt-tokio-crypto-rust --all-targets --all -- -D clippy::dbg_macro -D warnings -F unused_must_use + run: cargo clippy --features=${{ matrix.feature }} --all-targets --all -- -D clippy::dbg_macro -D warnings -F unused_must_use fmt: name: Rustfmt @@ -67,6 +72,11 @@ jobs: matrix: rust: - stable + feature: + - rt-async-io-crypto-rust + - rt-async-io-crypto-openssl + - rt-tokio-crypto-rust + - rt-tokio-crypto-openssl steps: - uses: actions/checkout@v4 @@ -94,22 +104,26 @@ jobs: # the login password doesn't matter, but the keyring must be unlocked for the tests to work run: gnome-keyring-daemon --components=secrets --daemonize --unlock <<< 'foobar' - - name: Run tests with RustCrypto + - name: Run tests # run tests single-threaded to avoid race conditions - run: cargo test --features=rt-tokio-crypto-rust -- --test-threads=1 - - - name: Run tests with OpenSSL crypto - # run tests single-threaded to avoid race conditions - run: cargo test --features=rt-tokio-crypto-openssl -- --test-threads=1 + run: cargo test --features=${{ matrix.feature }} -- --test-threads=1 - name: Run example - run: cargo run --features=rt-tokio-crypto-rust --example example + run: cargo run --features=${{ matrix.feature }} --example example # MSRV, influenced by zbus. check_msrv: name: Check MSRV runs-on: ubuntu-latest + strategy: + matrix: + feature: + - rt-async-io-crypto-rust + - rt-async-io-crypto-openssl + - rt-tokio-crypto-rust + - rt-tokio-crypto-openssl + steps: - uses: actions/checkout@v4 with: @@ -136,4 +150,4 @@ jobs: cargo update -p regex --precise "1.9.6" - name: Clippy MSRV - run: cargo clippy --features=rt-tokio-crypto-rust --all-targets --all -- -D clippy::dbg_macro -D warnings -F unused_must_use + run: cargo clippy --features=${{ matrix.feature }} --all-targets --all -- -D clippy::dbg_macro -D warnings -F unused_must_use