浏览代码

pipeline, Makefile: override the qemu provided in env

The CI will set QEMU to qemu-system-x86, which does not work for us as
we need to run the kernel on various platforms.

Github Action does not provide qemu for other architectures. We need to
install them manually as well.

Signed-off-by: greatbridf <greatbridf@icloud.com>
greatbridf 6 月之前
父节点
当前提交
35be7f9868
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. 3 0
      .github/workflows/test-build.yaml
  2. 1 1
      script/test.sh

+ 3 - 0
.github/workflows/test-build.yaml

@@ -28,6 +28,9 @@ jobs:
       - name: Setup rust nightly
         run: rustup component add rust-src llvm-tools
 
+      - name: Setup QEMU
+        run: sudo apt-get install -y qemu-system-${{ matrix.arch }}
+
       - name: Configure
         run: ./configure
 

+ 1 - 1
script/test.sh

@@ -8,6 +8,6 @@ if [ "$ARCH" = "" ]; then
 fi
 
 printf "ls\necho \"$SUCCESS_MSG\"\npoweroff\n" \
-    | make test-run ARCH=$ARCH MODE=release \
+    | make test-run ARCH=$ARCH MODE=release QEMU=qemu-system-$ARCH \
     | tee build/test-$$.log \
     | grep "$SUCCESS_MSG" > /dev/null && echo TEST\ $$\ WITH\ ARCH=$ARCH\ PASSED