@@ -15,24 +15,11 @@ jobs:
1515 with :
1616 target : riscv64gc-unknown-none-elf
1717 toolchain : nightly-2025-03-31
18-
18+
1919 - name : Install cargo-binutils and rust-objcopy
2020 run : |
2121 rustup component add llvm-tools-preview
2222 cargo install cargo-binutils
23-
24- - name : Prepare for Build
25- run : |
26- # Fix breaking update in rust dependency.
27- cargo fetch
28- find ~/.cargo/git/checkouts/ -type f -name '*.rs' -exec sed -i 's/#\[unsafe(naked)\]/#[naked]/g' {} +
29-
30- # Correct incorrect build directory name in build script.
31- sed -i '/^SBI :=/s#riscv64imac-unknown-none-elf#riscv64gc-unknown-none-elf#' Makefile
32- sed -i '/^SBI :=/s#riscv64imac-unknown-none-elf#riscv64gc-unknown-none-elf#' scripts/make/build.mk
33-
34- make clone-rustsbi
35- sed -i -E '/^\s*#\[repr\(align\(16\)\)\]\s*$/d' rustsbi/prototyper/prototyper/src/sbi/early_trap.rs
3623
3724 - name : Build with Makefile
3825 run : |
@@ -51,27 +38,43 @@ jobs:
5138
5239 - name : Build EDK2
5340 run : sh scripts/test/build_edk2.sh
54-
41+
5542 - name : Generate disk image
5643 run : sh scripts/test/disk.sh
5744
58- - name : Create EFI System Partition (ESP)
59- run : sh scripts/test/make_esp.sh
60-
6145 - name : Set up QEMU
6246 run : |
6347 sudo apt update
6448 sudo apt install -y qemu-system-misc
6549
66- - name : Run QEMU
67- run : |
68- make qemu-run > qemu.log
50+ # Test 1: HelloRiscv
51+ - name : Create ESP (HelloRiscv)
52+ run : EFI_NAME=HelloRiscv sh scripts/test/make_esp.sh
53+
54+ - name : Run QEMU (HelloRiscv)
55+ run : make qemu-run > qemu-hello.log
56+
57+ - name : Upload QEMU log (HelloRiscv)
58+ uses : actions/upload-artifact@v4
59+ with :
60+ name : log-hello
61+ path : qemu-hello.log
62+
63+ - name : Check QEMU output (HelloRiscv)
64+ run : sh scripts/test/check_hello_test.sh
65+
66+ # Test 2: AllocatePage
67+ - name : Create ESP (AllocatePage)
68+ run : EFI_NAME=AllocatePage sh scripts/test/make_esp.sh
69+
70+ - name : Run QEMU (AllocatePage)
71+ run : make qemu-run > qemu-allocate.log
6972
70- - name : Upload QEMU log
73+ - name : Upload QEMU log (AllocatePage)
7174 uses : actions/upload-artifact@v4
7275 with :
73- name : log
74- path : qemu.log
76+ name : log-allocate
77+ path : qemu-allocate .log
7578
76- - name : Check QEMU output
77- run : sh scripts/test/check_hello_test .sh
79+ - name : Check QEMU output (AllocatePage)
80+ run : sh scripts/test/check_allocate_test .sh
0 commit comments