Split linking into ELF and binary stage #38
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
- pull_request | |
- push | |
jobs: | |
test: | |
if: "! contains(toJSON(github.event.commits.*.message), '[test skip]')" | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Download packages | |
run: | | |
sudo apt-get install nasm qemu-system-x86 | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Compile | |
run: | | |
# todo: massive workaround, we need to use a proper x86_64 toolchain | |
cmake -B build -DKAOLIN_ENABLE_TESTS=ON -DCMAKE_C_FLAGS="-fno-PIC" . | |
cmake --build build | |
- name: Test | |
run: | | |
# we can't just cmake --target run because we want to map the exit code | |
set +e | |
qemu-system-x86_64 \ | |
-display none \ | |
-cpu qemu64 \ | |
-drive file=build/os.img,format=raw \ | |
-serial stdio \ | |
-device isa-debug-exit,iobase=0xf4,iosize=0x04 && exit 33 | |
exit_code=$? | |
if [[ $exit_code -eq 33 ]]; then | |
exit 0 | |
else | |
exit $exit_code | |
fi |