generated from rust-vmm/crate-template
-
Notifications
You must be signed in to change notification settings - Fork 12
56 lines (47 loc) · 1.95 KB
/
clh_build.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
name: Cloud Hypervisor Build
on: [pull_request, create]
jobs:
build:
if: github.event_name == 'pull_request'
name: Cloud Hypervisor Build using MSHV changes
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
target:
- x86_64-unknown-linux-gnu
steps:
- name: Code checkout
uses: actions/checkout@v4
with:
path: mshv
- name: Install Rust toolchain (${{ matrix.rust }})
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
components: rustfmt, clippy
- name: Cloning Cloud Hypervisor Repo
uses: actions/checkout@v4
with:
repository: cloud-hypervisor/cloud-hypervisor
path: cloud-hypervisor
- name: Copying script to CLH directory
working-directory: ./mshv
run: cp scripts/use-local-mshv-for-clh-build.sh ../cloud-hypervisor/
- name: Applying patch(to use local mshv crates) with script
working-directory: ./cloud-hypervisor
run: ./use-local-mshv-for-clh-build.sh
- name: Build Cloud-Hypervisor(mshv,kvm)
working-directory: ./cloud-hypervisor
run: cargo build --release --all --no-default-features --features mshv,kvm
- name: Build Cloud-Hypervisor(sev_snp)
working-directory: ./cloud-hypervisor
run: cargo build --release --all --no-default-features --features sev_snp
- name: Clippy(kvm,mshv)
working-directory: ./cloud-hypervisor
run: cargo clippy --locked --all --all-targets --no-default-features --tests --examples --features "mshv,kvm" -- -D warnings -D clippy::undocumented_unsafe_blocks
- name: Clippy(sev_snp)
working-directory: ./cloud-hypervisor
run: cargo clippy --locked --all --all-targets --no-default-features --tests --examples --features "sev_snp" -- -D warnings -D clippy::undocumented_unsafe_blocks