mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
build: disallow building tdx feature
It is broken. There is no use in producing something that doesn't work. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
10
.github/workflows/ci.yaml
vendored
10
.github/workflows/ci.yaml
vendored
@@ -448,14 +448,6 @@ jobs:
|
|||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
args: --locked --all --all-targets --no-default-features --tests --examples --features "mshv,igvm" -- -D warnings
|
args: --locked --all --all-targets --no-default-features --tests --examples --features "mshv,igvm" -- -D warnings
|
||||||
- name: Clippy (kvm + tdx)
|
|
||||||
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
|
|
||||||
uses: houseabsolute/actions-rust-cross@v1
|
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
toolchain: ${{ matrix.rust }}
|
|
||||||
target: ${{ matrix.target }}
|
|
||||||
args: --locked --all --all-targets --no-default-features --tests --examples --features "tdx,kvm" -- -D warnings
|
|
||||||
- name: Clippy (kvm + igvm + sev_snp + fw_cfg)
|
- name: Clippy (kvm + igvm + sev_snp + fw_cfg)
|
||||||
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
|
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
|
||||||
uses: houseabsolute/actions-rust-cross@v1
|
uses: houseabsolute/actions-rust-cross@v1
|
||||||
@@ -508,8 +500,6 @@ jobs:
|
|||||||
run: cargo build --locked --bin cloud-hypervisor
|
run: cargo build --locked --bin cloud-hypervisor
|
||||||
- name: Build (kvm)
|
- name: Build (kvm)
|
||||||
run: cargo build --locked --bin cloud-hypervisor --no-default-features --features "kvm"
|
run: cargo build --locked --bin cloud-hypervisor --no-default-features --features "kvm"
|
||||||
- name: Build (default features + tdx)
|
|
||||||
run: cargo build --locked --bin cloud-hypervisor --features "tdx"
|
|
||||||
- name: Build (default features + dbus_api)
|
- name: Build (default features + dbus_api)
|
||||||
run: cargo build --locked --bin cloud-hypervisor --features "dbus_api"
|
run: cargo build --locked --bin cloud-hypervisor --features "dbus_api"
|
||||||
- name: Build (default features + guest_debug)
|
- name: Build (default features + guest_debug)
|
||||||
|
|||||||
@@ -894,6 +894,8 @@ fn expand_fdtable() -> Result<(), FdTableError> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
#[cfg(feature = "tdx")]
|
||||||
|
compile_error!("Feature 'tdx' is broken.");
|
||||||
#[cfg(all(feature = "tdx", feature = "sev_snp"))]
|
#[cfg(all(feature = "tdx", feature = "sev_snp"))]
|
||||||
compile_error!("Feature 'tdx' and 'sev_snp' are mutually exclusive.");
|
compile_error!("Feature 'tdx' and 'sev_snp' are mutually exclusive.");
|
||||||
#[cfg(all(feature = "sev_snp", not(target_arch = "x86_64")))]
|
#[cfg(all(feature = "sev_snp", not(target_arch = "x86_64")))]
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ cargo_args=("")
|
|||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
if [[ $hypervisor = "mshv" ]]; then
|
if [[ $hypervisor = "mshv" ]]; then
|
||||||
cargo_args+=("--features $hypervisor")
|
cargo_args+=("--features $hypervisor")
|
||||||
elif [[ $(uname -m) = "x86_64" ]]; then
|
|
||||||
cargo_args+=("--features tdx")
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
|
|||||||
Reference in New Issue
Block a user