Build all tests in CI
This commit is contained in:
45
.github/workflows/build.yml
vendored
45
.github/workflows/build.yml
vendored
@@ -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
|
||||||
"
|
# "
|
||||||
|
Reference in New Issue
Block a user