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
name: CI
on:
push:
branches:
pull_request:
branches:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
jobs:
check:
name: Check
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
rust:
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-${{ matrix.rust }}
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets --all-features -- -D warnings
- run: cargo test --all-features
- run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: "-D warnings"
# Supply-chain checks. REPS §Dependency Management requires both
# `cargo audit` (RustSec advisory database) and `cargo deny check`
# (license / source / version policy) in CI. We use
# `taiki-e/install-action` which installs precompiled binaries —
# this sidesteps the compile-from-source MSRV churn that
# `rustsec/audit-check@v2` runs into when transitive deps of
# `cargo-audit` bump their own MSRV ahead of the runner's stable
# toolchain.
supply-chain:
name: Supply-chain audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: supply-chain
- name: Install cargo-audit + cargo-deny (precompiled)
uses: taiki-e/install-action@v2
with:
tool: cargo-audit,cargo-deny
- name: cargo audit
run: cargo audit
- name: cargo deny
run: cargo deny --all-features check