Skip to content
Merged
Show file tree
Hide file tree
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
48 changes: 43 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,69 @@ jobs:
- run: cargo test ${{ matrix.features }}

lint:
name: lint (${{ matrix.features }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
features:
- --all-features
- --no-default-features --features async
- --no-default-features --features blocking
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
components: clippy
# Every feature combination, not just the union. A lint that only ever sees `--all-features`
# never looks at the code a minimal build actually compiles.
- run: cargo clippy --all-targets ${{ matrix.features }} -- -D warnings

fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
# Formatting does not vary by feature, so this is one job rather than a matrix.
- run: cargo fmt --all --check
- run: cargo clippy --all-targets --all-features -- -D warnings

docs:
name: docs (${{ matrix.features }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
features:
- --all-features
- --no-default-features --features async
- --no-default-features --features blocking
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo doc --all-features --no-deps
# Matrixed because an intra-doc link can point at a feature-gated item and resolve fine
# under `--all-features` while breaking every smaller build.
- run: cargo doc ${{ matrix.features }} --no-deps
env:
RUSTDOCFLAGS: "-D warnings"

msrv:
name: msrv (1.85)
name: msrv 1.85 (${{ matrix.features }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
features:
- --all-features
- --no-default-features --features async
- --no-default-features --features blocking
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.85.0
- run: cargo check --all-features
# --all-targets so examples and tests are held to the MSRV too; a plain `cargo check`
# compiles neither.
- run: cargo check --all-targets ${{ matrix.features }}

semver:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ learning/

# Rust build output
/target
.DS_Store
Loading