Skip to content

tests: pin IRQ entry contract #45

tests: pin IRQ entry contract

tests: pin IRQ entry contract #45

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
install: sudo apt-get update && sudo apt-get install -y libsdl2-dev
cmake_extra: ""
- os: macos-latest
install: brew install sdl2
cmake_extra: ""
- os: windows-latest
install: vcpkg install sdl2:x64-windows
cmake_extra: -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -A x64
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Install SDL2
run: ${{ matrix.install }}
- name: Configure (Debug)
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug ${{ matrix.cmake_extra }}
- name: Build emulator
run: cmake --build build --target gba_emulator --config Debug -j
- name: Build tests
run: cmake --build build --target gba_tests --config Debug -j
- name: Run tests
working-directory: build
run: ctest --output-on-failure -C Debug
golden-frame:
needs: build-and-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install SDL2
run: sudo apt-get update && sudo apt-get install -y libsdl2-dev
- name: Configure (Release)
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: Build emulator
run: cmake --build build --target gba_emulator -j
- name: Fetch test ROMs
run: tools/fetch_test_roms.sh /tmp/gba-test-roms
- name: Check golden frames (jsmolka arm)
run: tools/check_golden.sh build/gba_emulator /tmp/gba-test-roms/jsmolka_arm.gba tests/golden/jsmolka_arm.hash
- name: Check golden frames (jsmolka thumb)
run: tools/check_golden.sh build/gba_emulator /tmp/gba-test-roms/jsmolka_thumb.gba tests/golden/jsmolka_thumb.hash
- name: Check golden frames (jsmolka memory)
run: tools/check_golden.sh build/gba_emulator /tmp/gba-test-roms/jsmolka_memory.gba tests/golden/jsmolka_memory.hash