10
10
11
11
jobs :
12
12
format :
13
- runs-on : ubuntu-20 .04
13
+ runs-on : ubuntu-22 .04
14
14
15
15
steps :
16
16
- name : install stable toolchain with rustfmt
27
27
args : -- --check
28
28
29
29
xen :
30
- runs-on : ubuntu-20 .04
30
+ runs-on : ubuntu-22 .04
31
31
32
32
steps :
33
33
- name : install Xen headers and libraries
52
52
args : --features xen -- -D warnings
53
53
54
54
kvm :
55
- runs-on : ubuntu-20 .04
55
+ runs-on : ubuntu-22 .04
56
56
57
57
steps :
58
58
- name : clone libkvmi
@@ -92,45 +92,40 @@ jobs:
92
92
uses : actions-rs/cargo@v1
93
93
with :
94
94
command : clean
95
- - name : install nightly toolchain
96
- uses : actions-rs/toolchain@v1
97
- with :
98
- profile : minimal
99
- toolchain : nightly
100
- override : true
95
+
101
96
- name : test KVM driver
102
97
uses : actions-rs/cargo@v1
103
98
with :
104
99
command : test
105
- # The target arg is a workaround in order to prevent build.rs files from being compiled with RUSTFLAGS
106
- # -Cpanic=abort can lead to issues with bindgen during compile time
107
100
# --lib only unit tests in the library, avoid integration tests
108
- args : --lib --features kvm --no-fail-fast --target x86_64-unknown-linux-gnu
101
+ args : --lib --features kvm
109
102
env :
110
- CARGO_INCREMENTAL : ' 0 '
111
- RUSTFLAGS : ' -Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests '
112
- RUSTDOCFLAGS : ' -Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests '
103
+ RUSTFLAGS : " -Cinstrument-coverage "
104
+ LLVM_PROFILE_FILE : " coverage-%p-%m.profraw "
105
+
113
106
- name : install grcov
114
107
uses :
actions-rs/[email protected]
115
108
with :
116
109
crate : grcov
117
110
version : latest
118
111
use-tool-cache : true
119
- - name : generate coverage report
120
- id : coverage
121
- uses :
actions-rs/[email protected]
122
- - name : upload coverage report to codecov.io
123
- uses : codecov/codecov-action@v1
124
- with :
125
- file : ${{ steps.coverage.outputs.report }}
126
- flags : unittests
127
- fail_ci_if_error : true
112
+
113
+ # - name: generate coverage report
114
+ # id: coverage
115
+ # uses: actions-rs/[email protected]
116
+
117
+ # - name: upload coverage report to codecov.io
118
+ # uses: codecov/codecov-action@v1
119
+ # with:
120
+ # file: ${{ steps.coverage.outputs.report }}
121
+ # flags: unittests
122
+ # fail_ci_if_error: true
128
123
129
124
memflow :
130
125
runs-on : ${{ matrix.os }}
131
126
strategy :
132
127
matrix :
133
- os : [ ubuntu-20 .04, windows-2022 ]
128
+ os : [ ubuntu-22 .04, windows-2022 ]
134
129
135
130
steps :
136
131
- name : install stable toolchain with clippy
@@ -153,7 +148,7 @@ jobs:
153
148
args : --features mflow -- -D warnings
154
149
155
150
virtualbox_linux :
156
- runs-on : ubuntu-20 .04
151
+ runs-on : ubuntu-22 .04
157
152
158
153
steps :
159
154
- name : clone Icebox repository
@@ -237,7 +232,7 @@ jobs:
237
232
runs-on : ${{ matrix.os }}
238
233
strategy :
239
234
matrix :
240
- os : [ubuntu-20 .04, windows-2022]
235
+ os : [ubuntu-22 .04, windows-2022]
241
236
242
237
steps :
243
238
- name : install stable toolchain
@@ -263,7 +258,7 @@ jobs:
263
258
runs-on : ${{ matrix.os }}
264
259
strategy :
265
260
matrix :
266
- os : [ubuntu-20 .04, windows-2022]
261
+ os : [ubuntu-22 .04, windows-2022]
267
262
steps :
268
263
- name : install stable toolchain with clippy
269
264
uses : actions-rs/toolchain@v1
@@ -284,7 +279,7 @@ jobs:
284
279
release_python :
285
280
# build a libmicrovmi python bindings release
286
281
# and upload it as artifact
287
- runs-on : ubuntu-20 .04
282
+ runs-on : ubuntu-22 .04
288
283
steps :
289
284
- name : install stable toolchain with clippy
290
285
uses : actions-rs/toolchain@v1
@@ -334,7 +329,7 @@ jobs:
334
329
335
330
# upload all generated wheels *.whl
336
331
- name : upload artifact
337
- uses : actions/upload-artifact@v2
332
+ uses : actions/upload-artifact@v4
338
333
with :
339
334
name : python_wheels
340
335
path : python/dist/manylinux/*
@@ -343,7 +338,7 @@ jobs:
343
338
# create a debian package with libmicrovmi release
344
339
# and upload it as artifact
345
340
needs : [format, xen, kvm, virtualbox_linux, memflow]
346
- runs-on : ubuntu-20 .04
341
+ runs-on : ubuntu-22 .04
347
342
348
343
steps :
349
344
- uses : actions/checkout@v1
@@ -400,7 +395,7 @@ jobs:
400
395
run : cargo deb --no-strip -- --features xen,kvm,virtualbox,mflow
401
396
402
397
- name : upload artifact
403
- uses : actions/upload-artifact@v2
398
+ uses : actions/upload-artifact@v4
404
399
with :
405
400
name : microvmi_deb
406
401
# microvmi_x.x.x_amd64.deb
@@ -466,30 +461,25 @@ jobs:
466
461
working-directory : libmicrovmi
467
462
468
463
- name : upload artifact
469
- uses : actions/upload-artifact@v2
464
+ uses : actions/upload-artifact@v4
470
465
with :
471
466
name : microvmi_win32
472
467
path : libmicrovmi/output/*
473
468
474
469
github_release :
475
- # create a Github release
476
- # only when
477
- # - push on master
478
- # - tag starts with 'v*'
479
470
needs : [c_api, examples, release_python, release_debian_package, release_windows]
480
- runs-on : ubuntu-20.04
481
- # output these value to be used by other jobs so they can add assets
471
+ runs-on : ubuntu-22.04
482
472
outputs :
483
473
upload_url : ${{ steps.step_upload_url.outputs.upload_url }}
484
474
version : ${{ steps.get_version.outputs.version }}
485
475
486
476
if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
487
477
steps :
488
- - uses : actions/checkout@v1
478
+ - uses : actions/checkout@v3
489
479
490
480
- name : Get the version
491
481
id : get_version
492
- run : echo ::set-output name=VERSION:: ${GITHUB_REF/ refs\ /tags\//}
482
+ run : echo "version= ${GITHUB_REF# refs/tags/}" >> $GITHUB_OUTPUT
493
483
494
484
- uses : actions/cache@v2
495
485
with :
@@ -509,32 +499,27 @@ jobs:
509
499
release_name : ${{ steps.get_version.outputs.version }}
510
500
511
501
- id : step_upload_url
512
- run : echo "::set-output name= upload_url:: ${{ steps.create_release.outputs.upload_url }}"
502
+ run : echo "upload_url= ${{ steps.create_release.outputs.upload_url }}" >> $GITHUB_OUTPUT
513
503
514
504
publish_debian_package :
515
- # publish the debian package in the Github Release
516
505
needs : github_release
517
- runs-on : ubuntu-20 .04
506
+ runs-on : ubuntu-22 .04
518
507
519
508
steps :
520
- # the deploy action below depends on a checkout of the repo
521
- # otherwise it fails trying to remote the 'origin' remote
522
- # https://github.com/JamesIves/github-pages-deploy-action/issues/335
523
- - uses : actions/checkout@v2
509
+ - uses : actions/checkout@v3
524
510
525
- # download artifacts
526
511
- uses : actions/download-artifact@v2
527
512
id : download
528
513
with :
529
514
name : microvmi_deb
530
515
531
- - name : get artifact path and name
516
+ - name : Get artifact path and name
532
517
id : artefact
533
518
run : |
534
519
PATHNAME=$(find . -maxdepth 1 -name '*.deb')
535
- NAME=$(basename $PATHNAME)
536
- echo ::set-output name= path::${ PATHNAME}
537
- echo ::set-output name=name::${ NAME}
520
+ NAME=$(basename " $PATHNAME" )
521
+ echo " path=$ PATHNAME" >> $GITHUB_OUTPUT
522
+ echo " name=$ NAME" >> $GITHUB_OUTPUT
538
523
539
524
- name : Upload Debian package as Release asset
540
525
@@ -546,9 +531,10 @@ jobs:
546
531
asset_name : ${{ steps.artefact.outputs.name }}
547
532
asset_content_type : application/vnd.debian.binary-package
548
533
534
+
549
535
publish_windows :
550
536
# publish the windows release on Github Release
551
- runs-on : ubuntu-20 .04
537
+ runs-on : ubuntu-22 .04
552
538
needs : github_release
553
539
steps :
554
540
- uses : actions/checkout@v1
@@ -579,7 +565,7 @@ jobs:
579
565
publish_book :
580
566
# build and publish the book on Github pages
581
567
needs : github_release
582
- runs-on : ubuntu-20 .04
568
+ runs-on : ubuntu-22 .04
583
569
584
570
steps :
585
571
- uses : actions/checkout@v1
@@ -608,7 +594,7 @@ jobs:
608
594
609
595
publish_crates_io :
610
596
needs : github_release
611
- runs-on : ubuntu-20 .04
597
+ runs-on : ubuntu-22 .04
612
598
613
599
# publish on crates.io
614
600
# this should be triggered by cargo release, which creates a new tag and pushes to the repo
@@ -627,7 +613,7 @@ jobs:
627
613
628
614
publish_pypi :
629
615
needs : github_release
630
- runs-on : ubuntu-20 .04
616
+ runs-on : ubuntu-22 .04
631
617
632
618
steps :
633
619
- uses : actions/checkout@v2
0 commit comments