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@v7 with: submodules: recursive - name: Install Dependencies run: | sudo apt-get update sudo apt-get install -y \ meson \ ninja-build \ libglew-dev \ libreadline-dev \ libedit-dev \ libcapstone-dev \ libudev-dev \ libpipewire-0.3-dev \ libarchive-dev \ libcurl4-openssl-dev \ p7zip-full - name: Download Test Roms run: | # Download BIOS echo "$BIOS_DATA" | base64 -d | gpg --decrypt --pinentry-mode loopback --passphrase "$BIOS_KEY" -o ./bios.bin # Create ROMs directory mkdir roms cd roms # Download AGS declare ags_url="$(echo "$AGS_URL" | base64 -d | gpg --decrypt --pinentry-mode loopback --passphrase "$AGS_KEY")" wget -q "$ags_url" -O ags.7z 7z e ags.7z shred -u ags.7z mv AGB_*.gba ags.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: Build the SDL3 run: | # Source & Documentation: # # https://github.com/libsdl-org/SDL/blob/main/docs/README-cmake.md # https://github.com/libsdl-org/SDL/blob/main/docs/README-linux.md # Install all SDL3 build dependencies sudo apt-get install build-essential git make \ pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \ libaudio-dev libfribidi-dev libjack-dev libsndio-dev libx11-dev libxext-dev \ libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev \ libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \ libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev \ libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev # Clone the SDL3 git clone https://github.com/libsdl-org/SDL.git sdl --branch release-3.4.0 # Build the SDL3 cd sdl cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSDL_STATIC=ON cmake --build build --config Release -j sudo cmake --install build --prefix /usr/local - name: Build Hades w/ Debugger run: | meson setup build --buildtype=release -Dwith_debugger=true ninja -C build - name: Check Accuracy run: | python3 ./accuracy/run.py --binary ./build/hades-dbg --roms ./roms/ --download # GitHub upload-artifact 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@v7 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