Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run CI with all feature variants #79

Merged
merged 1 commit into from
Jun 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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