Skip to content

Commit 42c8447

Browse files
committed
Add qemu based github actions test
1 parent ef79f4f commit 42c8447

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/riscv-qemu.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: RISC-V QEMU Tests
2+
3+
on:
4+
pull_request:
5+
# paths:
6+
# - 'src/rvv.c'
7+
# - 'src/diff.zig'
8+
# - 'src/test_color_delta.zig'
9+
push:
10+
branches: [main, feat/riscv]
11+
12+
jobs:
13+
riscv-qemu:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup Zig
19+
uses: mlugg/setup-zig@v2
20+
with:
21+
version: 0.15.1
22+
23+
- name: Install QEMU
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install -y qemu-user-static
27+
28+
- name: Build RISC-V with RVV
29+
run: |
30+
zig build -Dtarget=riscv64-linux-gnu -Doptimize=ReleaseFast
31+
32+
- name: Run RVV tests
33+
run: |
34+
qemu-riscv64-static -cpu help
35+
qemu-riscv64-static -cpu generic_rv64,v=true,vlen=128,elen=64 \
36+
zig-out/bin/odiff test/png/orange.png test/png/orange_changed.png /tmp/rvv-test.png
37+
38+
# Verify output was created
39+
[ -f /tmp/rvv-test.png ] && echo "✅ Done" || exit 1

0 commit comments

Comments
 (0)