1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: CI
on:
push:
branches:
pull_request:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
jobs:
test:
name: test (${{ 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 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: 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
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
# 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 (${{ 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
# --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
steps:
- uses: actions/checkout@v4
- uses: obi1kenobi/cargo-semver-checks-action@v2