Build all tests in CI
Some checks failed
Build / Enumerate tests (push) Successful in -1m6s
Build / Run Test `${{ matrix.test }}` (push) Failing after -1m5s

This commit is contained in:
2025-08-28 20:09:26 -06:00
parent 9c254f29fa
commit bb13d09825
2 changed files with 30 additions and 15 deletions

View File

@@ -16,9 +16,24 @@ jobs:
# # ./tests # # ./tests
# # extra_args: "--check_syntax=true" # # extra_args: "--check_syntax=true"
test: enumerate-tests:
name: Build C code name: Enumerate tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- id: set-matrix
run: echo "::set-output name=matrix::$(ls tests | grep test_* | jq -R -s -c 'split("\n")[:-1]')"
test:
needs: enumerate-tests
name: Run Test `${{ matrix.test }}`
runs-on: ubuntu-latest
strategy:
matrix:
test: ${{ fromJson(needs.enumerate-tests.outputs.matrix) }}
max-parallel: 1
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Build executables - name: Build executables
@@ -28,20 +43,20 @@ jobs:
args: | args: |
-c "\ -c "\
riscv64-unknown-elf-gcc --version && \ riscv64-unknown-elf-gcc --version && \
cd tests/test_basic && \ cd tests/${{ matrix.test }} && \
riscv64-unknown-elf-as test.S -o test.o && \ make test.o && \
riscv64-unknown-elf-ld -T tb.ld test.o -o test.elf && \ riscv64-unknown-elf-ld -melf32lriscv -T tb.ld test.o -o test.elf && \
riscv64-unknown-elf-objcopy --target=verilog test.elf test.hex && \ riscv64-unknown-elf-objcopy --target=verilog test.elf test.hex && \
echo "done" \ echo "done" \
" "
- name: Run Simulation # - name: Run Simulation
uses: docker://andrsmllr/iverilog:latest # uses: docker://andrsmllr/iverilog:latest
with: # with:
entrypoint: bash # entrypoint: bash
args: | # args: |
-c "\ # -c "\
cd tests/test_basic && \ # cd tests/test_basic && \
iverilog -g2012 -o test.out tb.sv ../../src/*.v -Y .sv -I ../../lib && \ # iverilog -g2012 -o test.out tb.sv ../../src/*.v -Y .sv -I ../../lib && \
./test.out | tee test.log # ./test.out | tee test.log
" # "