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
name: CI
on:
push:
branches:
pull_request:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
jobs:
check:
strategy:
fail-fast: false
matrix:
# File locking is the whole mechanism and each platform implements it
# differently (flock, LockFileEx), so every one of them runs the suite.
os:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- run: cargo fmt --check
# The default build must stay dependency-free, so it is checked on its
# own before the feature glue is switched on.
- run: cargo clippy --all-targets
- run: cargo test
- run: cargo clippy --all-features --all-targets
- run: cargo test --all-features
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# File::try_lock landed in 1.89; the crate promises to build there.
# Default features only — the optional dependencies set their own floor.
- uses: dtolnay/rust-toolchain@1.89.0
- run: cargo check --all-targets