-
Notifications
You must be signed in to change notification settings - Fork 12
109 lines (80 loc) · 2.41 KB
/
ci.yaml
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
98
99
100
101
102
103
104
105
106
107
108
109
name: CI
on:
pull_request:
merge_group:
env:
RUSTFLAGS: -D warnings -W unreachable-pub
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check
jobs:
cargo-test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@1.84
- name: Enable caching
uses: Swatinem/rust-cache@v2
- name: Compile
run: cargo test --all --all-targets --examples --no-run
- name: Run tests
run: cargo test --all --all-targets --examples
cargo-test-msrv:
name: Tests (1.80.0)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install arbitrary nightly toolchain
uses: dtolnay/rust-toolchain@1.80
with:
toolchain: nightly-2025-01-01
- name: Install msrv toolchain
uses: dtolnay/rust-toolchain@1.80
- name: Generate minimal-versions lockfile
run: cargo +nightly-2025-01-01 -Zminimal-versions generate-lockfile
- name: Enable caching
uses: Swatinem/rust-cache@v2
- name: Compile
run: cargo test --locked --all --all-targets --examples --no-run
- name: Run tests
run: cargo test --locked --all --all-targets --examples
cargo-fmt:
name: Formatting
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@1.84
- name: Check formatting
run: cargo fmt --all -- --check
cargo-clippy:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install toolchain
uses: dtolnay/rust-toolchain@1.84
with:
components: clippy
- name: Check clippy
run: cargo clippy --all --all-targets
cargo-miri:
name: Miri
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- name: Enable caching
uses: Swatinem/rust-cache@v2
- name: Miri setup
run: cargo miri setup
- name: Miri test
run: cargo miri test --workspace --all-features