Skip to content

Commit dbc8b86

Browse files
cpuchifflier
authored andcommitted
ci: adopt feature matrix, no-std build
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.
1 parent cfd8a4a commit dbc8b86

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.github/workflows/rust.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,28 @@ jobs:
2727
run: cargo update
2828
- run: RUSTFLAGS="-D warnings" cargo check
2929

30-
test:
31-
name: Test Suite
30+
test_features:
31+
name: Test suite (with features)
32+
runs-on: ubuntu-latest
33+
strategy:
34+
matrix:
35+
features:
36+
- --features=default
37+
- --all-features
38+
steps:
39+
- uses: actions/checkout@v4
40+
- name: Install stable toolchain
41+
uses: dtolnay/rust-toolchain@stable
42+
- run: cargo test ${{ matrix.features }}
43+
44+
test_no_std:
45+
name: Test suite (no-std)
3246
runs-on: ubuntu-latest
3347
steps:
3448
- uses: actions/checkout@v4
3549
- name: Install stable toolchain
3650
uses: dtolnay/rust-toolchain@stable
37-
- run: cargo test
51+
- run: RUSTFLAGS="-D warnings" cargo test --no-default-features
3852

3953
fmt:
4054
name: Rustfmt

0 commit comments

Comments
 (0)