mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-25 01:11:16 +00:00
This commit introduces three new dependencies: `zbus`, `futures` and `blocking`. `blocking` is used to call the Internal API in zbus' async context which is driven by `futures::executor`. They are all behind the `dbus_api` feature flag. The D-Bus API implementation is behind the same `dbus_api` feature flag as well. Signed-off-by: Omer Faruk Bayram <omer.faruk@sartura.hr>
62 lines
2.2 KiB
YAML
62 lines
2.2 KiB
YAML
name: Cloud Hypervisor Build
|
|
on: [pull_request, create]
|
|
|
|
jobs:
|
|
build:
|
|
if: github.event_name == 'pull_request'
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
rust:
|
|
- stable
|
|
- beta
|
|
- nightly
|
|
- "1.64"
|
|
target:
|
|
- x86_64-unknown-linux-gnu
|
|
- x86_64-unknown-linux-musl
|
|
steps:
|
|
- name: Code checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install musl-gcc
|
|
run: sudo apt install -y musl-tools
|
|
|
|
- name: Install Rust toolchain (${{ matrix.rust }})
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
target: ${{ matrix.target }}
|
|
override: true
|
|
|
|
- name: Build (default features)
|
|
run: cargo rustc --locked --bin cloud-hypervisor -- -D warnings -D clippy::undocumented_unsafe_blocks
|
|
|
|
- name: Build (kvm)
|
|
run: cargo rustc --locked --bin cloud-hypervisor --no-default-features --features "kvm" -- -D warnings -D clippy::undocumented_unsafe_blocks
|
|
|
|
- name: Build (default features + tdx)
|
|
run: cargo rustc --locked --bin cloud-hypervisor --features "tdx" -- -D warnings -D clippy::undocumented_unsafe_blocks
|
|
|
|
- name: Build (default features + dbus_api)
|
|
run: cargo rustc --locked --bin cloud-hypervisor --features "dbus_api" -- -D warnings -D clippy::undocumented_unsafe_blocks
|
|
|
|
- name: Build (default features + guest_debug)
|
|
run: cargo rustc --locked --bin cloud-hypervisor --features "guest_debug" -- -D warnings -D clippy::undocumented_unsafe_blocks
|
|
|
|
- name: Build (mshv)
|
|
run: cargo rustc --locked --bin cloud-hypervisor --no-default-features --features "mshv" -- -D warnings -D clippy::undocumented_unsafe_blocks
|
|
|
|
- name: Build (mshv + kvm)
|
|
run: cargo rustc --locked --bin cloud-hypervisor --no-default-features --features "mshv,kvm" -- -D warnings -D clippy::undocumented_unsafe_blocks
|
|
|
|
- name: Release Build (default features)
|
|
run: cargo build --locked --all --release --target=${{ matrix.target }}
|
|
|
|
- name: Check build did not modify any files
|
|
run: test -z "$(git status --porcelain)"
|