-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
81 additions
and
6 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Accuracy Checks | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fetch Source Code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- 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 | ||
- name: Extract BIOS | ||
run: | | ||
echo "$BIOS_DATA" | base64 -d > bios.bin.gpg | ||
gpg --pinentry-mode loopback --passphrase "$BIOS_KEY" ./bios.bin.gpg | ||
file bios.bin | ||
sha256sum ./bios.bin | ||
env: | ||
BIOS_DATA: ${{ secrets.BIOS_DATA }} | ||
BIOS_KEY: ${{ secrets.BIOS_KEY }} | ||
- name: Download Test Roms | ||
run: | | ||
mkdir roms | ||
cd roms | ||
wget https://raw.githubusercontent.com/jsmolka/gba-tests/master/arm/arm.gba | ||
wget https://raw.githubusercontent.com/jsmolka/gba-tests/master/thumb/thumb.gba | ||
- name: Build Hades w/ Debugger | ||
run: | | ||
meson build --werror -Dwith_debugger=true | ||
cd build | ||
ninja | ||
- name: Check Accuracy | ||
run: | | ||
# Setup a fake audio environment | ||
export SDL_AUDIODRIVER=disk | ||
ln -s /dev/null sdlaudio.raw | ||
# Setup a fake X11 environment | ||
export DISPLAY=:99 | ||
sudo Xvfb -ac "$DISPLAY" -screen 0 1280x1024x24 > /dev/null 2>&1 & | ||
# Setup the configuration | ||
cat << EOF > config.json | ||
{ | ||
"file": { | ||
"bios": "./bios.bin" | ||
}, | ||
"emulation": { | ||
"skip_bios": true, | ||
"speed": 0, | ||
"unbounded": false, | ||
"backup_storage": { | ||
"autodetect": true, | ||
"type": 0 | ||
}, | ||
"rtc": { | ||
"autodetect": true, | ||
"enabled": true | ||
} | ||
}, | ||
} | ||
EOF | ||
# Run accuracy checks | ||
cat << EOF | ./build/hades ./roms/arm.gba | ||
r | ||
f 10 | ||
r | ||
exit | ||
EOF |