Add TDX compilation test
This commit is contained in:
parent
b3d30f7ac3
commit
a0a8493f98
|
@ -24,6 +24,22 @@ jobs:
|
|||
id: check
|
||||
run: make check
|
||||
|
||||
compilation:
|
||||
if: github.event_name == 'push' || github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
container: asterinas/asterinas:0.9.4
|
||||
steps:
|
||||
- run: echo "Running in asterinas/asterinas:0.9.4"
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# The compilation test builds the project with all features enabled.
|
||||
# In contrast, subsequent tests may choose to enable select features.
|
||||
- name: Compilation
|
||||
id: compilation
|
||||
run: make build FEATURES=all
|
||||
|
||||
unit-test:
|
||||
if: github.event_name == 'push' || github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -52,9 +68,9 @@ jobs:
|
|||
image: asterinas/asterinas:0.9.4
|
||||
options: --device=/dev/kvm
|
||||
strategy:
|
||||
matrix:
|
||||
matrix:
|
||||
# The ids of each test
|
||||
test_id:
|
||||
test_id:
|
||||
- 'boot_test_mb'
|
||||
- 'boot_test_linux_legacy32'
|
||||
- 'syscall_test'
|
||||
|
|
7
Makefile
7
Makefile
|
@ -32,11 +32,12 @@ GDB_PROFILE_INTERVAL ?= 0.1
|
|||
AUTO_TEST ?= none
|
||||
EXTRA_BLOCKLISTS_DIRS ?= ""
|
||||
SYSCALL_TEST_DIR ?= /tmp
|
||||
FEATURES ?=
|
||||
# End of auto test features.
|
||||
|
||||
# Network settings
|
||||
NETDEV ?= user # Possible values are user,tap
|
||||
VHOST ?= off
|
||||
VHOST ?= off
|
||||
# End of network settings
|
||||
|
||||
# ========================= End of Makefile options. ==========================
|
||||
|
@ -87,6 +88,10 @@ else
|
|||
CARGO_OSDK_ARGS += --boot-method="$(BOOT_METHOD)"
|
||||
endif
|
||||
|
||||
ifdef FEATURES
|
||||
CARGO_OSDK_ARGS += --features="$(FEATURES)"
|
||||
endif
|
||||
|
||||
# To test the linux-efi-handover64 boot protocol, we need to use Debian's
|
||||
# GRUB release, which is installed in /usr/bin in our Docker image.
|
||||
ifeq ($(BOOT_PROTOCOL), linux-efi-handover64)
|
||||
|
|
|
@ -70,4 +70,6 @@ version = "1.0"
|
|||
features = ["spin_no_std"]
|
||||
|
||||
[features]
|
||||
all = ["cvm_guest"]
|
||||
|
||||
cvm_guest = ["dep:tdx-guest", "ostd/cvm_guest"]
|
||||
|
|
Loading…
Reference in New Issue