diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81ad3ed..adcfc56 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -101,8 +101,13 @@ jobs: - name: 'Build kernel' run: cargo make build - - name: 'Run tests' + - name: 'Run tests (macOS)' run: cargo make test + if: runner.os == 'macOS' + + - name: 'Run tests (other OSes)' + run: env QEMU_MACHINE=raspi3 cargo make test + if: runner.os != 'macOS' check_formatting: name: "Check Formatting" diff --git a/Makefile.toml b/Makefile.toml index d697f9f..a4b8552 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -22,6 +22,8 @@ TARGET_BOARD = { value = "rpi4", condition = { env_not_set = ["TARGET_BOARD"] } # AArch64 QEMU binary QEMU = { value = "qemu-system-aarch64", condition = { env_not_set = ["QEMU"] } } +# QEMU machine type, defaults to raspi3b but CI runners override it due to ancient QEMU versions they use. +QEMU_MACHINE = { value = "raspi3b", condition = { env_not_set = ["QEMU_MACHINE"] } } # An aarch64-enabled GDB GDB = { value = "/usr/local/opt/gdb/HEAD-a2c58332-aarch64/bin/aarch64-unknown-elf-gdb", condition = { env_not_set = ["GDB"] } } @@ -57,7 +59,8 @@ QEMU_CONTAINER_CMD = "qemu-system-aarch64" # Could additionally use -nographic to disable GUI -- this shall be useful for automated tests. # # -d in_asm,unimp,int -QEMU_OPTS = "-M raspi3 -d int -semihosting" +# QEMU has renamed the RasPi machines since version 6.2.0, use just `raspi3` for previous versions. +QEMU_OPTS = "-M ${QEMU_MACHINE} -d int -semihosting" QEMU_SERIAL_OPTS = "-serial null -serial stdio" QEMU_TESTS_OPTS = "-nographic" # For gdb connection: