Skip to content

Commit 08c6eed

Browse files
committed
ci: add MSRV (1.80) and beta channel testing via matrix
Matrix strategy with conditional steps: - MSRV (1.80): build + test only (no clippy - lints evolve) - stable: full checks on all platforms (ubuntu/macos/windows) - beta: clippy + test, allowed to fail (early warning) Uses dtolnay/rust-toolchain@master with toolchain parameter for flexibility.
1 parent 1811ec0 commit 08c6eed

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,55 @@ concurrency:
1010

1111
jobs:
1212
test:
13+
name: ${{ matrix.rust }} / ${{ matrix.os }}
1314
runs-on: ${{ matrix.os }}
15+
continue-on-error: ${{ matrix.rust == 'beta' }}
1416
strategy:
1517
fail-fast: false
1618
matrix:
17-
os: [ubuntu-latest, macos-latest, windows-latest]
19+
# Full OS matrix for stable only; MSRV and beta on ubuntu only
20+
include:
21+
# MSRV - ensures we don't use newer Rust features
22+
- rust: "1.80"
23+
os: ubuntu-latest
24+
# Stable - primary target, all platforms
25+
- rust: stable
26+
os: ubuntu-latest
27+
- rust: stable
28+
os: macos-latest
29+
- rust: stable
30+
os: windows-latest
31+
# Beta - early warning (allowed to fail)
32+
- rust: beta
33+
os: ubuntu-latest
1834
steps:
1935
- uses: actions/checkout@v5
2036

2137
- name: Install Rust toolchain
22-
uses: dtolnay/rust-toolchain@stable
38+
uses: dtolnay/rust-toolchain@master
2339
with:
24-
components: rustfmt, clippy
40+
toolchain: ${{ matrix.rust }}
41+
components: ${{ matrix.rust != '1.80' && 'rustfmt, clippy' || '' }}
2542

2643
- name: Cache cargo registry
2744
uses: Swatinem/rust-cache@v2
2845
with:
2946
cache-all-crates: true
3047

48+
# Formatting and clippy only on stable (lints evolve between versions)
3149
- name: Check formatting
50+
if: matrix.rust == 'stable'
3251
run: cargo fmt --check
3352

3453
- name: Run clippy
54+
if: matrix.rust != '1.80'
3555
run: cargo clippy --all-features -- -D warnings
3656

3757
- name: Run tests (all features)
3858
run: cargo test --all-features
3959

4060
- name: Run FFI tests
61+
if: matrix.rust == 'stable'
4162
run: cargo test --features ffi
4263

4364
security:

0 commit comments

Comments
 (0)