Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
felixjones committed Jul 23, 2022
0 parents commit 646f216
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on: [push]

jobs:
test-rom:
runs-on: ubuntu-latest
name: Test a GBA ROM
steps:
- uses: actions/checkout@v3
- id: test-2x3
uses: felixjones/github-mgba-rom-test@v1
with:
swi-call: 3
read-register: 'r0'
rom-path: 'rom/testRom.gba'
success-code: 6
- run: |
echo "2 x 3 = ${{ steps.test-2x3.outputs.exitcode }}"
shell: bash
34 changes: 34 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'mGBA ROM Test'
description: 'Unit testing for Game Boy Advance ROMs'
inputs:
swi-call:
description: 'Software Interrupt that ends the test'
required: true
default: 3
read-register:
description: 'General purpose register to return as exit code'
required: true
default: 'r0'
rom-path:
description: 'Game Boy Advance ROM path'
required: true
success-code:
description: 'Expected value in read-register'
required: false
default: 0
outputs:
exitcode:
description: 'Test exit code'
value: ${{ steps.mgba-rom-test.outputs.exitcode }}
runs:
using: "composite"
steps:
- id: mgba-rom-test
shell: bash
run: |
set +e
bin/ubuntu/mgba-rom-test -S ${{ inputs.swi-call }} -R ${{ inputs.read-register }} ${{ inputs.rom-path }}
rom_test_exitcode=$?
set -e
echo "::set-output name=exitcode::$rom_test_exitcode"
if [[ $rom_test_exitcode == ${{ inputs.success-code }} ]]; then exit 0; else exit 1; fi
Binary file added bin/ubuntu/mgba-rom-test
Binary file not shown.
Binary file added rom/testRom.gba
Binary file not shown.

0 comments on commit 646f216

Please sign in to comment.