13
13
permissions :
14
14
contents : read
15
15
16
+ env :
17
+ RUSTFLAGS : -Dwarnings
18
+ RUSTDOCFLAGS : -Dwarnings
19
+
16
20
jobs :
17
21
stable :
18
22
name : " Test MSRV and Stable Features"
@@ -24,100 +28,45 @@ jobs:
24
28
runs-on : ubuntu-latest
25
29
steps :
26
30
- uses : actions/checkout@v4
27
- - uses : actions-rs/ toolchain@v1
31
+ - uses : dtolnay/rust- toolchain@master
28
32
with :
29
- profile : minimal
30
33
toolchain : ${{ matrix.rust }}
31
- override : true
32
- - name : Run cargo build for stable
33
- uses : actions-rs/cargo@v1
34
- with :
35
- command : build
36
- args : --no-default-features --features instructions
37
- - name : Run cargo build for stable without instructions
38
- uses : actions-rs/cargo@v1
39
- with :
40
- command : build
41
- args : --no-default-features
42
- - name : Run cargo doc for stable
43
- uses : actions-rs/cargo@v1
44
- with :
45
- command : doc
46
- args : --no-default-features --features instructions
47
- - name : Run cargo doc for stable without instructions
48
- uses : actions-rs/cargo@v1
49
- with :
50
- command : doc
51
- args : --no-default-features
52
- - name : Run cargo test for stable
53
- uses : actions-rs/cargo@v1
54
- with :
55
- command : test
56
- args : --no-default-features --features instructions
57
- - name : Run cargo test for stable without instructions
58
- uses : actions-rs/cargo@v1
59
- with :
60
- command : test
61
- args : --no-default-features
34
+ - run : cargo build --no-default-features --features instructions
35
+ - run : cargo build --no-default-features
36
+ - run : cargo doc --no-default-features --features instructions
37
+ - run : cargo doc --no-default-features
38
+ - run : cargo test --no-default-features --features instructions
39
+ - run : cargo test --no-default-features
62
40
63
41
test :
64
42
name : " Test"
65
43
66
44
strategy :
67
45
fail-fast : false
68
46
matrix :
69
- platform : [ubuntu-latest, macos-latest, windows-latest]
47
+ platform : [ubuntu-latest, macos-12, macos- latest, windows-latest]
70
48
71
49
runs-on : ${{ matrix.platform }}
72
50
timeout-minutes : 15
73
51
74
52
steps :
75
53
- uses : actions/checkout@v4
76
- - uses : actions-rs/ toolchain@v1
54
+ - uses : dtolnay/rust- toolchain@nightly
77
55
with :
78
- profile : minimal
79
- toolchain : nightly
80
- override : true
81
- target : x86_64-unknown-linux-musl
82
-
83
- - name : " Print Rust Version"
84
- run : |
85
- rustc -Vv
86
- cargo -Vv
56
+ targets : x86_64-unknown-linux-musl, i686-unknown-linux-gnu, thumbv7em-none-eabihf
87
57
88
- - name : " Run cargo build"
89
- uses : actions-rs/cargo@v1
90
- with :
91
- command : build
58
+ - run : cargo build
92
59
93
- - name : " Run cargo doc"
94
- uses : actions-rs/cargo@v1
95
- with :
96
- command : doc
60
+ - run : cargo doc
97
61
98
- - name : " Run cargo build on musl"
99
- uses : actions-rs/cargo@v1
100
- with :
101
- command : build
102
- args : --target x86_64-unknown-linux-musl
62
+ - run : cargo build --target x86_64-unknown-linux-musl
103
63
if : runner.os == 'Linux'
104
64
105
- - name : " Run cargo test"
106
- uses : actions-rs/cargo@v1
107
- with :
108
- command : test
65
+ - run : cargo test
109
66
110
- - name : " Run cargo test on musl"
111
- uses : actions-rs/cargo@v1
112
- with :
113
- command : test
114
- args : --target x86_64-unknown-linux-musl
67
+ - run : cargo test --target x86_64-unknown-linux-musl
115
68
if : runner.os == 'Linux'
116
69
117
- - name : " Install Rustup Targets"
118
- run : |
119
- rustup target add i686-unknown-linux-gnu
120
- rustup target add thumbv7em-none-eabihf
121
70
- name : " Build on non x86_64 platforms"
122
71
run : |
123
72
cargo build --target i686-unknown-linux-gnu --no-default-features --features nightly
134
83
runs-on : ${{ matrix.platform }}
135
84
timeout-minutes : 15
136
85
86
+ env :
87
+ RUSTFLAGS : -Crelocation-model=static -Dwarnings
88
+
137
89
steps :
138
90
- name : " Checkout Repository"
139
91
uses : actions/checkout@v4
@@ -148,15 +100,10 @@ jobs:
148
100
run : echo "$GITHUB_WORKSPACE/binaries/bin" >> $GITHUB_PATH
149
101
shell : bash
150
102
151
- - name : " Install Rustup Components"
152
- uses : actions-rs/toolchain@v1
103
+ - uses : dtolnay/rust-toolchain@nightly
153
104
with :
154
- toolchain : nightly
155
- override : true
156
- profile : minimal
157
- components : rust-src, llvm-tools-preview
158
- - name : " Install cargo-xbuild"
159
- run : cargo install cargo-xbuild --debug --root binaries
105
+ targets : x86_64-unknown-none
106
+ components : rust-src, llvm-tools
160
107
- name : " Install bootimage"
161
108
run : cargo install bootimage --debug --root binaries
162
109
@@ -184,7 +131,7 @@ jobs:
184
131
run : qemu-system-x86_64 --version
185
132
186
133
- name : " Run Test Framework"
187
- run : cargo xtest
134
+ run : cargo test
188
135
shell : bash
189
136
working-directory : " testing"
190
137
@@ -194,32 +141,21 @@ jobs:
194
141
timeout-minutes : 2
195
142
steps :
196
143
- uses : actions/checkout@v4
197
- - uses : actions-rs/ toolchain@v1
144
+ - uses : dtolnay/rust- toolchain@nightly
198
145
with :
199
- toolchain : nightly
200
- override : true
201
- profile : minimal
202
146
components : rustfmt
203
- - uses : actions-rs/cargo@v1
204
- with :
205
- command : fmt
206
- args : --all -- --check
147
+ - run : cargo fmt --all -- --check
207
148
208
149
clippy :
209
150
name : " Clippy"
210
151
runs-on : ubuntu-latest
211
152
timeout-minutes : 10
212
153
steps :
213
154
- uses : actions/checkout@v4
214
- - uses : actions-rs/ toolchain@v1
155
+ - uses : dtolnay/rust- toolchain@nightly
215
156
with :
216
- toolchain : nightly
217
- override : true
218
- profile : minimal
219
157
components : clippy
220
- - uses : actions-rs/cargo@v1
221
- with :
222
- command : clippy
158
+ - run : cargo clippy
223
159
224
160
semver-checks :
225
161
name : Semver Checks
@@ -233,3 +169,13 @@ jobs:
233
169
- run : cargo install cargo-semver-checks --locked
234
170
- name : Check semver
235
171
run : cargo +stable semver-checks check-release
172
+
173
+ kani :
174
+ runs-on : ubuntu-20.04
175
+ steps :
176
+ - uses : actions/checkout@v4
177
+ - uses : Swatinem/rust-cache@v2
178
+ with :
179
+ shared-key : " kani"
180
+ cache-targets : false
181
+ - uses : model-checking/kani-github-action@v1.1
0 commit comments