48 lines
1.3 KiB
YAML
48 lines
1.3 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"
|
|
|
|
test:
|
|
name: Build C code
|
|
runs-on: ubuntu-latest
|
|
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/test_basic && \
|
|
riscv64-unknown-elf-as test.S -o test.o && \
|
|
riscv64-unknown-elf-ld -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
|
|
"
|