-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (54 loc) · 1.67 KB
/
TestOpcodes.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Test opcode execution
name: Test Opcodes
on:
push:
workflow_dispatch:
inputs:
message:
description: Message to display in job summary
required: false
type: string
jobs:
test-opcodes:
strategy:
matrix:
include:
- assembler: 'zasm'
exec: 'zasm/zasm'
options: '--ixcbr2'
outputfileoption: '-o '
- assembler: 'z88dk'
exec: 'z88dk/z88dk-z80asm'
options: '-v -b'
outputfileoption: '-o'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup emulator and assembler
run: |
make
cd tools
chmod +x ${{ matrix.exec }}
- name: Test opcodes
env:
FILES: test_execution_no_flag_updates test_execution_call_jump_loop_return test_execution_with_flag_updates test_execution_daa test_execution_duplicate_mnemonics
run: |
cd tools
for f in $FILES; do
echo "file basename: ${f}"
${{ matrix.exec }} ${{ matrix.options }} ${f}.asm ${{ matrix.outputfileoption}}${f}.rom
echo "2" > options.txt
echo "1" >> options.txt
echo "7" >> options.txt
echo ${f}.testout >> options.txt
echo "9" >> options.txt
echo "options file:"
cat options.txt
../emulator ${f}.rom <options.txt
echo "Comparing... ${f}.result ${f}.testout"
cmp ${f}.result ${f}.testout
done
- name: Print the job summary
if: ${{ inputs.message }}
run: |
echo ${{ inputs.message }} >$GITHUB_STEP_SUMMARY