Parcourir la source

Add CI build for x64_64 example. (#86)

* Add CI build for x64_64 example.

* Disable KVM for QEMU in CI.

* Disable tcp feature in x86_64 example by default.

It waits forever, which is no good in CI.
Andrew Walbran il y a 1 an
Parent
commit
2eb2d17d30
3 fichiers modifiés avec 13 ajouts et 1 suppressions
  1. 6 1
      .github/workflows/main.yml
  2. 6 0
      examples/x86_64/Makefile
  3. 1 0
      examples/x86_64/rust-toolchain

+ 6 - 1
.github/workflows/main.yml

@@ -66,6 +66,7 @@ jobs:
         example:
           - aarch64
           - riscv
+          - x86_64
         include:
           - example: aarch64
             toolchain: stable
@@ -75,6 +76,10 @@ jobs:
             toolchain: nightly-2022-11-03
             target: riscv64imac-unknown-none-elf
             packages: qemu-system-misc
+          - example: x86_64
+            toolchain: nightly
+            target: x86_64-unknown-none
+            packages: qemu-system-x86
     steps:
       - uses: actions/checkout@v2
       - name: Install QEMU
@@ -93,4 +98,4 @@ jobs:
         run: make kernel
       - name: Run
         working-directory: examples/${{ matrix.example }}
-        run: QEMU_ARGS="-display none" make qemu
+        run: QEMU_ARGS="-display none" make qemu accel="off"

+ 6 - 0
examples/x86_64/Makefile

@@ -4,6 +4,7 @@ mode := release
 kernel := target/$(target)/$(mode)/$(arch)
 img := target/$(target)/$(mode)/img
 accel := on
+tcp ?= off
 
 sysroot := $(shell rustc --print sysroot)
 objdump := $(shell find $(sysroot) -name llvm-objdump) --arch-name=$(arch)
@@ -13,6 +14,11 @@ BUILD_ARGS += --target $(target)
 ifeq ($(mode), release)
 	BUILD_ARGS += --release
 endif
+ifeq ($(tcp), on)
+	BUILD_ARGS += --features tcp
+else
+	BUILD_ARGS += --no-default-features
+endif
 
 VSOCK_BUILD_ARGS =
 ifeq ($(mode), release)

+ 1 - 0
examples/x86_64/rust-toolchain

@@ -0,0 +1 @@
+nightly