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
# # extra_args: "--check_syntax=true"
test:
name: Build C code
enumerate-tests:
name: Enumerate tests
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:
- uses: actions/checkout@v4
- name: Build executables
@@ -28,20 +43,20 @@ jobs:
args: |
-c "\
riscv64-unknown-elf-gcc --version && \
cd tests/test_basic && \
riscv64-unknown-elf-as test.S -o test.o && \
riscv64-unknown-elf-ld -T tb.ld test.o -o test.elf && \
cd tests/${{ matrix.test }} && \
make test.o && \
riscv64-unknown-elf-ld -melf32lriscv -T tb.ld test.o -o test.elf && \
riscv64-unknown-elf-objcopy --target=verilog test.elf test.hex && \
echo "done" \
"
- name: Run Simulation
uses: docker://andrsmllr/iverilog:latest
with:
entrypoint: bash
args: |
-c "\
cd tests/test_basic && \
iverilog -g2012 -o test.out tb.sv ../../src/*.v -Y .sv -I ../../lib && \
./test.out | tee test.log
"
# - name: Run Simulation
# uses: docker://andrsmllr/iverilog:latest
# with:
# entrypoint: bash
# args: |
# -c "\
# cd tests/test_basic && \
# iverilog -g2012 -o test.out tb.sv ../../src/*.v -Y .sv -I ../../lib && \
# ./test.out | tee test.log
# "