Files
cpu/.github/workflows/build.yml
Brendan Haines 1533ddb4f5
All checks were successful
Build / Enumerate tests (push) Successful in -1m10s
Build / Run Test `test_basic` (push) Successful in -1m8s
explicit matrix because gitea runner isn't happy
2025-08-28 20:25:33 -06:00

64 lines
1.7 KiB
YAML

name: Build
on: push
jobs:
# lint:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - uses: chipsalliance/verible-linter-action@main
# # with:
# # paths: |
# # ./src
# # ./lib
# # ./tests
# # extra_args: "--check_syntax=true"
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) }}
test:
- test_basic
max-parallel: 1
steps:
- uses: actions/checkout@v4
- name: Build executables
uses: docker://runtimeverificationinc/riscv-gnu-toolchain:ubuntu-jammy-2024.04.12
with:
entrypoint: sh
args: |
-c "\
riscv64-unknown-elf-gcc --version && \
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 "\
# iverilog -g2012 -o test.out tb.sv ../../src/*.v -Y .sv -I ../../lib && \
./test.out | tee test.log
"