feat: Riscv support #14
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: RISC-V QEMU Tests | |
| on: | |
| pull_request: | |
| # paths: | |
| # - 'src/rvv.c' | |
| # - 'src/diff.zig' | |
| # - 'src/test_color_delta.zig' | |
| push: | |
| branches: [main, feat/riscv] | |
| jobs: | |
| riscv-qemu: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Zig | |
| uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.15.1 | |
| - name: Install QEMU | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y qemu-user-static | |
| - name: Build RISC-V with RVV | |
| run: | | |
| zig build -Dtarget=riscv64-linux -Dcpu=riscv64+rva23u64 -Doptimize=ReleaseFast | |
| - name: Run RVV tests | |
| run: | | |
| qemu-riscv64-static -cpu rv64,zba=true,zbb=true,v=true,vlen=256,vext_spec=v1.0,rvv_ta_all_1s=true,rvv_ma_all_1s=true \ | |
| zig-out/bin/odiff test/png/orange.png test/png/orange_changed.png /tmp/rvv-test.png | |
| # Verify output was created | |
| [ -f /tmp/rvv-test.png ] && echo "✅ Done" || exit 1 |