-
Notifications
You must be signed in to change notification settings - Fork 12
164 lines (135 loc) · 3.67 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: CI
on:
pull_request:
push: # bors
branches:
- staging
- trying
env:
CI: 1
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: false
CARGO_PROFILE_RELEASE_DEBUG: false
RUSTFLAGS: -D warnings -W unreachable-pub
MIRIFLAGS: -Zmiri-check-number-validity -Zmiri-symbolic-alignment-check -Zmiri-tag-raw-pointers
jobs:
cargo-test:
name: Tests
if: ${{ github.event.pusher.name == 'bors[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
profile: minimal
override: true
- name: Enable caching
uses: Swatinem/rust-cache@v1.3.0
- name: Compile
uses: actions-rs/cargo@v1
with:
command: test
args: --all --all-targets --examples --no-run
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all --all-targets --examples
cargo-test-msrv:
name: Tests (1.41.0)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install arbitrary nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-01-01
profile: minimal
- name: Install msrv toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.41.0
profile: minimal
override: true
- name: Generate minimal-versions lockfile
uses: actions-rs/cargo@v1
with:
command: +nightly-2022-01-01
args: -Z minimal-versions generate-lockfile
- name: Enable caching
uses: Swatinem/rust-cache@v1.3.0
- name: Compile
uses: actions-rs/cargo@v1
with:
command: test
args: --locked --all --all-targets --examples --no-run
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --locked --all --all-targets --examples
cargo-fmt:
name: Formatting
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Instal toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.59.0
override: true
components: rustfmt
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
cargo-clippy:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install beta toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.59.0
override: true
components: clippy
- name: Check style
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --all-targets
cargo-miri:
name: Miri
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: miri
- name: Enable caching
uses: Swatinem/rust-cache@v1.3.0
- name: Miri setup
uses: actions-rs/cargo@v1
with:
command: miri
args: setup
- name: Miri test
uses: actions-rs/cargo@v1
with:
command: miri
args: test --workspace --all-features