@@ -13,43 +13,29 @@ jobs:
13
13
runs-on : ubuntu-22.04
14
14
15
15
steps :
16
- - name : install stable toolchain with rustfmt
17
- uses : actions-rs/ toolchain@v1
16
+ - name : Install Rust toolchain
17
+ uses : dtolnay/rust- toolchain@stable
18
18
with :
19
- profile : minimal
20
- toolchain : stable
21
19
components : rustfmt
22
20
- uses : actions/checkout@v1
23
21
- name : rustfmt check
24
- uses : actions-rs/cargo@v1
25
- with :
26
- command : fmt
27
- args : -- --check
22
+ run : cargo fmt --check
28
23
29
24
xen :
30
25
runs-on : ubuntu-22.04
31
26
32
27
steps :
33
28
- name : install Xen headers and libraries
34
29
run : sudo apt-get install -y libxen-dev
35
- - name : install stable toolchain with clippy
36
- uses : actions-rs/ toolchain@v1
30
+ - name : Install Rust toolchain
31
+ uses : dtolnay/rust- toolchain@stable
37
32
with :
38
- profile : minimal
39
- toolchain : stable
40
33
components : clippy
41
34
- uses : actions/checkout@v1
42
- - name : build Xen driver
43
- uses : actions-rs/cargo@v1
44
- with :
45
- command : build
46
- args : --features xen
47
- - name : annotate commit with clippy warnings
48
- uses : actions-rs/clippy-check@v1
49
- with :
50
- name : clippy xen
51
- token : ${{ secrets.GITHUB_TOKEN }}
52
- args : --features xen -- -D warnings
35
+ - name : build and check Xen driver
36
+ run : |
37
+ cargo build --features xen
38
+ cargo clippy --features xen -- -D warnings
53
39
54
40
kvm :
55
41
runs-on : ubuntu-22.04
@@ -70,45 +56,30 @@ jobs:
70
56
sudo make install
71
57
working-directory : libkvmi
72
58
73
- - name : install stable toolchain with clippy
74
- uses : actions-rs/ toolchain@v1
59
+ - name : Install Rust toolchain
60
+ uses : dtolnay/rust- toolchain@stable
75
61
with :
76
- profile : minimal
77
- toolchain : stable
78
62
components : clippy
79
63
- uses : actions/checkout@v1
80
- - name : build KVM driver
81
- uses : actions-rs/cargo@v1
82
- with :
83
- command : build
84
- args : --features kvm
85
- - name : annotate commit with clippy warnings
86
- uses : actions-rs/clippy-check@v1
87
- with :
88
- name : clippy kvm
89
- token : ${{ secrets.GITHUB_TOKEN }}
90
- args : --features kvm -- -D warnings
91
- - name : remove compilation artifacts from stable toolchain
92
- uses : actions-rs/cargo@v1
93
- with :
94
- command : clean
64
+ - name : build and check KVM driver
65
+ run : |
66
+ cargo build --features kvm
67
+ cargo clippy --features kvm -- -D warnings
68
+ - name : remove compilation artifacts
69
+ run : cargo clean
95
70
96
71
- name : test KVM driver
97
- uses : actions-rs/cargo@v1
98
- with :
99
- command : test
100
- # --lib only unit tests in the library, avoid integration tests
101
- args : --lib --features kvm
72
+ run : cargo test --lib --features kvm
102
73
env :
103
74
RUSTFLAGS : " -Cinstrument-coverage"
104
75
LLVM_PROFILE_FILE : " coverage-%p-%m.profraw"
105
76
106
- - name : install grcov
107
- uses :
actions-rs/[email protected]
108
- with :
109
- crate : grcov
110
- version : latest
111
- use-tool-cache : true
77
+ # - name: install grcov
78
+ # uses: actions-rs/[email protected]
79
+ # with:
80
+ # crate: grcov
81
+ # version: latest
82
+ # use-tool-cache: true
112
83
113
84
# - name: generate coverage report
114
85
# id: coverage
@@ -128,24 +99,15 @@ jobs:
128
99
os : [ ubuntu-22.04, windows-2022 ]
129
100
130
101
steps :
131
- - name : install stable toolchain with clippy
132
- uses : actions-rs/ toolchain@v1
102
+ - name : Install Rust toolchain
103
+ uses : dtolnay/rust- toolchain@stable
133
104
with :
134
- profile : minimal
135
- toolchain : stable
136
105
components : clippy
137
106
- uses : actions/checkout@v1
138
- - name : build Memflow driver
139
- uses : actions-rs/cargo@v1
140
- with :
141
- command : build
142
- args : --features mflow
143
- - name : annotate commit with clippy warnings
144
- uses : actions-rs/clippy-check@v1
145
- with :
146
- name : clippy memflow
147
- token : ${{ secrets.GITHUB_TOKEN }}
148
- args : --features mflow -- -D warnings
107
+ - name : build and check Memflow driver
108
+ run : |
109
+ cargo build --features mflow
110
+ cargo clippy --features mflow -- -D warnings
149
111
150
112
virtualbox_linux :
151
113
runs-on : ubuntu-22.04
@@ -159,34 +121,23 @@ jobs:
159
121
g++ -std=c++11 -shared -fPIC FDP.cpp -o libFDP.so -lrt
160
122
sudo cp include/* /usr/local/include
161
123
sudo cp libFDP.so /usr/local/lib
162
- - name : install stable toolchain with clippy
163
- uses : actions-rs/ toolchain@v1
124
+ - name : Install Rust toolchain
125
+ uses : dtolnay/rust- toolchain@stable
164
126
with :
165
- profile : minimal
166
- toolchain : stable
167
127
components : clippy
168
128
- uses : actions/checkout@v1
169
- - name : build VirtualBox driver
170
- uses : actions-rs/cargo@v1
171
- with :
172
- command : build
173
- args : --features virtualbox
174
- - name : annotate commit with clippy warnings
175
- uses : actions-rs/clippy-check@v1
176
- with :
177
- name : clippy virtualbox
178
- token : ${{ secrets.GITHUB_TOKEN }}
179
- args : --features virtualbox -- -D warnings
129
+ - name : build and check VirtualBox driver
130
+ run : |
131
+ cargo build --features virtualbox
132
+ cargo clippy --features virtualbox -- -D warnings
180
133
181
134
virtualbox_windows :
182
135
runs-on : windows-2022
183
136
184
137
steps :
185
- - name : install stable toolchain with clippy
186
- uses : actions-rs/ toolchain@v1
138
+ - name : Install Rust toolchain
139
+ uses : dtolnay/rust- toolchain@stable
187
140
with :
188
- profile : minimal
189
- toolchain : stable
190
141
components : clippy
191
142
192
143
- name : Clone Icebox repository
@@ -220,10 +171,7 @@ jobs:
220
171
run : choco install llvm
221
172
222
173
- name : build VirtualBox driver
223
- uses : actions-rs/cargo@v1
224
- with :
225
- command : build
226
- args : --manifest-path libmicrovmi/Cargo.toml --features virtualbox
174
+ run : cargo build --manifest-path libmicrovmi/Cargo.toml --features virtualbox
227
175
env :
228
176
BINDGEN_EXTRA_CLANG_ARGS : -I"C:\FDP" -L"C:\FDP"
229
177
CARGO_BUILD_RUSTFLAGS : -L C:\FDP
@@ -235,18 +183,13 @@ jobs:
235
183
os : [ubuntu-22.04, windows-2022]
236
184
237
185
steps :
238
- - name : install stable toolchain
239
- uses : actions-rs/toolchain@v1
240
- with :
241
- profile : minimal
242
- toolchain : stable
186
+ - name : Install Rust toolchain
187
+ uses : dtolnay/rust-toolchain@stable
243
188
244
189
- uses : actions/checkout@v1
245
190
246
191
- name : build libmicrovmi
247
- uses : actions-rs/cargo@v1
248
- with :
249
- command : build
192
+ run : cargo build
250
193
251
194
- name : build C API
252
195
run : |
@@ -260,32 +203,24 @@ jobs:
260
203
matrix :
261
204
os : [ubuntu-22.04, windows-2022]
262
205
steps :
263
- - name : install stable toolchain with clippy
264
- uses : actions-rs/ toolchain@v1
206
+ - name : Install Rust toolchain
207
+ uses : dtolnay/rust- toolchain@stable
265
208
with :
266
- profile : minimal
267
- toolchain : stable
268
209
components : clippy
269
210
270
211
- uses : actions/checkout@v1
271
212
272
- - name : build examples with clippy
273
- uses : actions-rs/clippy-check@v1
274
- with :
275
- name : clippy examples
276
- token : ${{ secrets.GITHUB_TOKEN }}
277
- args : --examples -- -D warnings
213
+ - name : check examples with clippy
214
+ run : cargo clippy --examples -- -D warnings
278
215
279
216
release_python :
280
217
# build a libmicrovmi python bindings release
281
218
# and upload it as artifact
282
219
runs-on : ubuntu-22.04
283
220
steps :
284
- - name : install stable toolchain with clippy
285
- uses : actions-rs/ toolchain@v1
221
+ - name : Install Rust toolchain
222
+ uses : dtolnay/rust- toolchain@stable
286
223
with :
287
- profile : minimal
288
- toolchain : stable
289
224
components : clippy
290
225
291
226
- name : Set up Python 3.8 🐍
@@ -301,18 +236,10 @@ jobs:
301
236
nox -r
302
237
working-directory : python
303
238
304
- - name : build Python extension
305
- uses : actions-rs/cargo@v1
306
- with :
307
- command : build
308
- args : -p pymicrovmi
309
-
310
- - name : annotate commit with clippy warnings
311
- uses : actions-rs/clippy-check@v1
312
- with :
313
- name : clippy python
314
- token : ${{ secrets.GITHUB_TOKEN }}
315
- args : -p pymicrovmi -- -D warnings
239
+ - name : build Python extension and check with clippy
240
+ run : |
241
+ cargo build -p pymicrovmi
242
+ cargo clippy -p pymicrovmi -- -D warnings
316
243
317
244
- name : install Python package
318
245
run : |
@@ -377,7 +304,7 @@ jobs:
377
304
- name : install cargo deb dependencies
378
305
run : sudo apt-get install -y dpkg liblzma-dev
379
306
380
- - uses : actions/cache@v2
307
+ - uses : actions/cache@v4
381
308
with :
382
309
path : |
383
310
~/.cargo/registry
@@ -407,11 +334,9 @@ jobs:
407
334
needs : [virtualbox_windows, memflow]
408
335
runs-on : windows-2022
409
336
steps :
410
- - name : install stable toolchain with clippy
411
- uses : actions-rs/ toolchain@v1
337
+ - name : Install Rust toolchain
338
+ uses : dtolnay/rust- toolchain@stable
412
339
with :
413
- profile : minimal
414
- toolchain : stable
415
340
components : clippy
416
341
417
342
- name : Clone Icebox repository
@@ -445,10 +370,7 @@ jobs:
445
370
run : choco install llvm
446
371
447
372
- name : build libmicrovmi with virtualbox and memflow driver
448
- uses : actions-rs/cargo@v1
449
- with :
450
- command : build
451
- args : --manifest-path libmicrovmi/Cargo.toml --features virtualbox,mflow --release
373
+ run : cargo build --manifest-path libmicrovmi/Cargo.toml --features virtualbox,mflow --release
452
374
env :
453
375
BINDGEN_EXTRA_CLANG_ARGS : -I"C:\FDP" -L"C:\FDP"
454
376
CARGO_BUILD_RUSTFLAGS : -L C:\FDP
@@ -481,7 +403,7 @@ jobs:
481
403
id : get_version
482
404
run : echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
483
405
484
- - uses : actions/cache@v2
406
+ - uses : actions/cache@v4
485
407
with :
486
408
path : |
487
409
~/.cargo/registry
@@ -570,7 +492,7 @@ jobs:
570
492
steps :
571
493
- uses : actions/checkout@v1
572
494
573
- - uses : actions/cache@v2
495
+ - uses : actions/cache@v4
574
496
with :
575
497
path : |
576
498
~/.cargo/registry
@@ -605,6 +527,9 @@ jobs:
605
527
606
528
- uses : actions/checkout@v1
607
529
530
+ - name : Install Rust toolchain
531
+ uses : dtolnay/rust-toolchain@stable
532
+
608
533
- name : Publish
609
534
shell : bash
610
535
run : |
0 commit comments