mirror of
https://github.com/olofk/serv.git
synced 2025-04-20 11:57:07 -04:00
automate RISC-V compliance check with github actions
This commit is contained in:
parent
d6445b95a6
commit
d7e9b39c13
1 changed files with 55 additions and 0 deletions
55
.github/workflows/ci.yml
vendored
Normal file
55
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
name: serv ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
compliance:
|
||||
name: RISC-V Compliance Test
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: install fusesoc, verilator and gcc
|
||||
run: |
|
||||
sudo apt-get install -y python3-setuptools verilator gcc-riscv64-unknown-elf
|
||||
pip3 install --user fusesoc
|
||||
echo "~/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: init fusesoc
|
||||
run: fusesoc init -y
|
||||
|
||||
- name: set SERV directory
|
||||
run: echo "SERV=$GITHUB_WORKSPACE/.." >> $GITHUB_ENV
|
||||
|
||||
- name: setup workspace
|
||||
run: |
|
||||
ls $GITHUB_WORKSPACE
|
||||
mkdir $SERV/workspace
|
||||
cd $SERV/workspace
|
||||
fusesoc library add serv $SERV
|
||||
|
||||
- name: lint
|
||||
run: |
|
||||
cd $SERV/workspace
|
||||
fusesoc run --target=lint serv
|
||||
|
||||
- name: build servant
|
||||
run: |
|
||||
cd $SERV/workspace
|
||||
fusesoc run --target=verilator_tb --setup --build --build-root=servant_x servant
|
||||
|
||||
- name: download risc-v compliance
|
||||
run: |
|
||||
cd $SERV
|
||||
git clone https://github.com/riscv/riscv-compliance
|
||||
|
||||
- name: run risc-v compliance
|
||||
run: |
|
||||
cd $SERV/riscv-compliance
|
||||
make TARGETDIR=$SERV/serv/riscv-target RISCV_TARGET=serv RISCV_DECICE=rv32i RISCV_ISA=rv32i TARGET_SIM=$SERV/workspace/servant_x/verilator_tb-verilator/Vservant_sim
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue