Skip to content

Commit 8eb47bf

Browse files
committed
feat(ci): test matrix
1 parent 411f31f commit 8eb47bf

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/main.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,63 @@ jobs:
2828
2929
make T="$test_name" 2>&1 | tee /dev/stderr | grep -q "HIT GOOD TRAP"
3030
done
31+
32+
name: RISC-V Simulator CI
33+
34+
on:
35+
push:
36+
branches: [ main ]
37+
pull_request:
38+
branches: [ main ]
39+
40+
jobs:
41+
build-simulator:
42+
runs-on: ubuntu-latest
43+
container:
44+
image: docker.io/harsonlau/riscv-tools:latest
45+
46+
steps:
47+
- uses: actions/checkout@v3
48+
49+
- name: Build Simulator
50+
run: make -C sim
51+
52+
- name: Upload Simulator Artifact
53+
uses: actions/upload-artifact@v3
54+
with:
55+
name: simulator-build
56+
path: sim/build
57+
58+
run-all-tests:
59+
needs: build-simulator
60+
runs-on: ubuntu-latest
61+
container:
62+
image: docker.io/harsonlau/riscv-tools:latest
63+
64+
strategy:
65+
fail-fast: false
66+
matrix:
67+
test_name: [
68+
'ackermann',
69+
'add',
70+
'div',
71+
'dummy',
72+
'if-else',
73+
'load-store',
74+
'matrix-mul',
75+
'quicksort',
76+
'shift',
77+
'unalign'
78+
]
79+
80+
steps:
81+
- uses: actions/checkout@v3
82+
83+
- name: Download Simulator Artifact
84+
uses: actions/download-artifact@v3
85+
with:
86+
name: simulator-build
87+
path: sim/build
88+
89+
- name: Run Test (${{ matrix.test_name }})
90+
run: make T=${{ matrix.test_name }} 2>&1 | tee /dev/stderr | grep -q "HIT GOOD TRAP"

0 commit comments

Comments
 (0)