Skip to content

Commit

Permalink
ci: adopt feature matrix, no-std build
Browse files Browse the repository at this point in the history
Adopts a similar feature matrix approach as the asn1-rs CI. `cargo test`
will be run for default features, and all features (at the time of
writing, there's only 1 `std` feature, so these are equivalent).

Like asn1-rs a separate job is added for running
a `--no-default-features` no-std build.
  • Loading branch information
cpu authored and chifflier committed Apr 12, 2024
1 parent cfd8a4a commit dbc8b86
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,28 @@ jobs:
run: cargo update
- run: RUSTFLAGS="-D warnings" cargo check

test:
name: Test Suite
test_features:
name: Test suite (with features)
runs-on: ubuntu-latest
strategy:
matrix:
features:
- --features=default
- --all-features
steps:
- uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- run: cargo test ${{ matrix.features }}

test_no_std:
name: Test suite (no-std)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- run: cargo test
- run: RUSTFLAGS="-D warnings" cargo test --no-default-features

fmt:
name: Rustfmt
Expand Down

0 comments on commit dbc8b86

Please sign in to comment.