-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
34 lines (34 loc) · 1.02 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
${{github.action_path}}/bin/ubuntu/mgba-rom-test -S ${{ inputs.swi-call }} -R ${{ inputs.read-register }} ${{ inputs.rom-path }}
rom_test_exitcode=$?
set -e
echo "name=exitcode::$rom_test_exitcode" >> $GITHUB_OUTPUT
if [[ $rom_test_exitcode == ${{ inputs.success-code }} ]]; then exit 0; else exit 1; fi