generated from rust-vmm/crate-template
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github: Add a new workflow to compile vfio crates
Signed-off-by: Muminul Islam <muislam@microsoft.com>
- Loading branch information
1 parent
f739486
commit 76bbc50
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: VFIO Build | ||
on: [pull_request, create] | ||
|
||
jobs: | ||
build: | ||
if: github.event_name == 'pull_request' | ||
name: VFIO 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 vfio Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: rust-vmm/vfio | ||
path: vfio | ||
- name: Copying script to vfio directory | ||
working-directory: ./mshv | ||
run: cp scripts/use-local-mshv-for-vfio-build.sh ../vfio/ | ||
|
||
- name: Applying patch(to use local mshv crates) with script | ||
working-directory: ./vfio | ||
run: ./use-local-mshv-for-vfio-build.sh | ||
|
||
- name: Build vfio(mshv) | ||
working-directory: ./vfio | ||
run: cargo build --release --all --no-default-features --features mshv | ||
|
||
- name: Build vfio(nohv) | ||
working-directory: ./vfio | ||
run: cargo build --release --no-default-features | ||
|
||
- name: Clippy(mshv) | ||
working-directory: ./vfio | ||
run: cargo clippy --workspace --bins --examples --benches --no-default-features --features mshv --all-targets -- -D warnings | ||
|
||
- name: Clippy(nohv) | ||
working-directory: ./vfio | ||
run: cargo clippy --workspace --bins --examples --benches --no-default-features --all-targets -- -D warnings | ||
|