Reword a few comments and function names. #269
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: Accuracy | |
on: | |
push: | |
branches: | |
- master | |
pull_request_target: | |
workflow_dispatch: | |
jobs: | |
linux: | |
name: Linux x64 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Source Code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Download Test Roms | |
run: | | |
# Download BIOS | |
echo "$BIOS_DATA" | base64 -d | gpg --pinentry-mode loopback --passphrase "$BIOS_KEY" -d -o ./bios.bin | |
# Create ROMs directory | |
mkdir roms | |
cd roms | |
# Download AGS | |
declare ags_url="$(echo "$AGS_URL" | base64 -d | gpg --pinentry-mode loopback --passphrase "$AGS_KEY" -d)" | |
wget -q "$ags_url" -O ags.zip | |
unzip ags.zip | |
shred -u ags.zip | |
mv AGB_*.gba ags.gba | |
# Download mGBA Suite | |
wget -q https://s3.amazonaws.com/mgba/suite-latest.zip -O suite.zip | |
unzip suite.zip | |
mv suite*.gba mgba-suite.gba | |
# Download the remaining testing ROMs | |
wget -q https://raw.githubusercontent.com/jsmolka/gba-tests/master/arm/arm.gba -O jsmolka-arm.gba | |
wget -q https://raw.githubusercontent.com/jsmolka/gba-tests/master/bios/bios.gba -O jsmolka-bios.gba | |
wget -q https://raw.githubusercontent.com/jsmolka/gba-tests/master/memory/memory.gba -O jsmolka-memory.gba | |
wget -q https://raw.githubusercontent.com/jsmolka/gba-tests/master/nes/nes.gba -O jsmolka-nes.gba | |
wget -q https://raw.githubusercontent.com/jsmolka/gba-tests/master/thumb/thumb.gba -O jsmolka-thumb.gba | |
wget -q https://raw.githubusercontent.com/jsmolka/gba-tests/master/unsafe/unsafe.gba -O jsmolka-unsafe.gba | |
wget -q https://raw.githubusercontent.com/jsmolka/gba-tests/master/save/flash64.gba -O jsmolka-flash64.gba | |
wget -q https://raw.githubusercontent.com/jsmolka/gba-tests/master/save/flash128.gba -O jsmolka-flash128.gba | |
wget -q https://raw.githubusercontent.com/jsmolka/gba-tests/master/save/none.gba -O jsmolka-none.gba | |
wget -q https://raw.githubusercontent.com/jsmolka/gba-tests/master/save/sram.gba -O jsmolka-sram.gba | |
wget -q https://raw.githubusercontent.com/Arignir/Hades-Tests/master/roms/dma-start-delay.gba -O hades-dma-start-delay.gba | |
wget -q https://raw.githubusercontent.com/Arignir/Hades-Tests/master/roms/dma-latch.gba -O hades-dma-latch.gba | |
wget -q https://raw.githubusercontent.com/Arignir/Hades-Tests/master/roms/bios-openbus.gba -O hades-bios-openbus.gba | |
wget -q https://raw.githubusercontent.com/Arignir/Hades-Tests/master/roms/timer-basic.gba -O hades-timer-basic.gba | |
wget -q https://raw.githubusercontent.com/nba-emu/hw-test/master/dma/start-delay/start-delay.gba -O nba-dma-start-delay.gba | |
wget -q https://raw.githubusercontent.com/nba-emu/hw-test/master/dma/latch/latch.gba -O nba-dma-latch.gba | |
wget -q https://raw.githubusercontent.com/nba-emu/hw-test/master/timer/reload/reload.gba -O nba-timer-reload.gba | |
wget -q https://raw.githubusercontent.com/nba-emu/hw-test/master/timer/start-stop/start-stop.gba -O nba-timer-start-stop.gba | |
wget -q https://raw.githubusercontent.com/nba-emu/hw-test/master/irq/irq-delay/irq-delay.gba -O nba-irq-delay.gba | |
# Clear-out all secrets to not leak them to the later steps | |
unset BIOS_DATA BIOS_KEY AGS_URL AGS_KEY ags_url | |
env: | |
BIOS_DATA: ${{ secrets.BIOS_DATA }} | |
BIOS_KEY: ${{ secrets.BIOS_KEY }} | |
AGS_URL: ${{ secrets.AGS_URL }} | |
AGS_KEY: ${{ secrets.AGS_KEY }} | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
meson \ | |
ninja-build \ | |
libsdl2-dev \ | |
libglew-dev \ | |
libgtk-3-dev \ | |
libreadline-dev \ | |
libedit-dev \ | |
libcapstone-dev \ | |
libarchive-dev | |
- name: Build Hades w/ Debugger | |
run: | | |
meson build --werror -Dwith_debugger=true | |
ninja -C build | |
- name: Check Accuracy | |
run: | | |
python3 ./accuracy/check.py --binary ./build/hades --roms ./roms/ | |
# GitHub upload-artifact@v4 doesn't include hidden files and directories | |
# https://github.com/actions/upload-artifact/issues/602 | |
mv -v {.,}tests_screenshots | |
- name: Collect Screenshots | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: tests-screenshots | |
path: './tests_screenshots' | |
if-no-files-found: error | |
- name: Cleanup | |
if: always() | |
run: | | |
if [[ -f ./bios.bin ]]; then | |
shred -u ./bios.bin | |
echo "BIOS deleted" | |
fi | |
if [[ -f ./roms/ags.gba ]]; then | |
shred -u ./roms/ags.gba | |
echo "AGS deleted" | |
fi |