Skip to content

Merge branch 'main' of github.com:nouveaus/kaolin into feature/drivers #44

Merge branch 'main' of github.com:nouveaus/kaolin into feature/drivers

Merge branch 'main' of github.com:nouveaus/kaolin into feature/drivers #44

Workflow file for this run

name: Test
on:
- pull_request
- push
jobs:
test:
if: |
(! contains(toJSON(github.event.commits.*.message), '[test skip]')) &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)
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