Skip to content

Commit

Permalink
WIP.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arignir committed Dec 15, 2023
1 parent cab06e7 commit c42ba2e
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
run:
shell: msys2 {0}
steps:
- name: 'Sync source code'
- name: Fetch Source Code
uses: actions/checkout@v4
with:
submodules: 'recursive'
submodules: recursive
- name: Install Dependencies
uses: msys2/setup-msys2@v2
with:
Expand All @@ -35,10 +35,10 @@ jobs:
mac-os:
runs-on: macos-latest
steps:
- name: 'Sync source code'
- name: Fetch Source Code
uses: actions/checkout@v4
with:
submodules: 'recursive'
submodules: recursive
- name: Install Dependencies
run: |
brew install meson ninja sdl2 glew create-dmg
Expand Down Expand Up @@ -130,10 +130,10 @@ jobs:
linux:
runs-on: ubuntu-latest
steps:
- name: 'Sync source code'
- name: Fetch Source Code
uses: actions/checkout@v4
with:
submodules: 'recursive'
submodules: recursive
- name: Install Dependencies
run: |
sudo apt-get update
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
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: Download Test Roms
run: |
echo "$BIOS_DATA" | base64 -d | gpg --pinentry-mode loopback --passphrase "$BIOS_KEY" -d -o ./bios.bin
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
env:
BIOS_DATA: ${{ secrets.BIOS_DATA }}
BIOS_KEY: ${{ secrets.BIOS_KEY }}
- 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
- name: Cleanup
if: always()
run: |
if [[ -f ./bios.bin ]]; then
shred -u ./bios.bin
fi

0 comments on commit c42ba2e

Please sign in to comment.