Просмотр исходного кода

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 месяцев назад
Родитель
Сommit
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
       - name: Setup rust nightly
         run: rustup component add rust-src llvm-tools
         run: rustup component add rust-src llvm-tools
 
 
+      - name: Setup QEMU
+        run: sudo apt-get install -y qemu-system-${{ matrix.arch }}
+
       - name: Configure
       - name: Configure
         run: ./configure
         run: ./configure
 
 

+ 1 - 1
script/test.sh

@@ -8,6 +8,6 @@ if [ "$ARCH" = "" ]; then
 fi
 fi
 
 
 printf "ls\necho \"$SUCCESS_MSG\"\npoweroff\n" \
 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 \
     | tee build/test-$$.log \
     | grep "$SUCCESS_MSG" > /dev/null && echo TEST\ $$\ WITH\ ARCH=$ARCH\ PASSED
     | grep "$SUCCESS_MSG" > /dev/null && echo TEST\ $$\ WITH\ ARCH=$ARCH\ PASSED