forked from chipsalliance/Cores-VeeR-EL2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rafal Kolucki <[email protected]>
- Loading branch information
1 parent
bd3615b
commit a82cfc1
Showing
5 changed files
with
121 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
name: VeeR-EL2 verification | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
|
||
verilator: | ||
name: Build Verilator | ||
runs-on: ubuntu-latest | ||
env: | ||
CCACHE_DIR: "/opt/veer-el2/.cache/" | ||
DEBIAN_FRONTEND: "noninteractive" | ||
|
||
steps: | ||
- name: Install prerequisities | ||
run: | | ||
sudo apt -qqy update && sudo apt -qqy --no-install-recommends install \ | ||
git autoconf automake autotools-dev curl python3 python3-pip \ | ||
libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex \ | ||
texinfo gperf libtool patchutils bc zlib1g zlib1g-dev libexpat-dev \ | ||
ninja-build ccache libfl2 libfl-dev help2man | ||
- name: Create Cache Timestamp | ||
id: cache_timestamp | ||
uses: nanzm/[email protected] | ||
with: | ||
format: 'YYYY-MM-DD-HH-mm-ss' | ||
|
||
- name: Setup cache | ||
uses: actions/cache@v2 | ||
timeout-minutes: 3 | ||
continue-on-error: true | ||
with: | ||
path: "/opt/veer-el2/.cache/" | ||
key: cache_${{ steps.cache_timestamp.outputs.time }} | ||
restore-keys: cache_ | ||
|
||
- name: Build Verilator | ||
run: | | ||
git clone https://github.com/verilator/verilator | ||
pushd verilator | ||
git checkout v5.008 | ||
autoconf | ||
./configure --prefix=/opt/verilator | ||
make -j `nproc` | ||
make install | ||
popd | ||
cd /opt && tar -czvf verilator.tar.gz verilator/ | ||
- name: Store Verilator binaries | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: verilator | ||
path: /opt/*.tar.gz | ||
retention-days: 1 | ||
|
||
tests: | ||
name: Verification tests | ||
runs-on: ubuntu-latest | ||
needs: verilator | ||
env: | ||
DEBIAN_FRONTEND: "noninteractive" | ||
|
||
steps: | ||
- name: Setup repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
path: Caliptra | ||
|
||
- name: Setup repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt -qqy update && sudo apt -qqy --no-install-recommends install \ | ||
git python3 python3-pip build-essential ninja-build cpanminus ccache \ | ||
gcc-riscv64-unknown-elf | ||
sudo cpanm Bit::Vector | ||
pip3 install meson | ||
pip3 install -r verification/requirements.txt | ||
- name: Download verilator binaries | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: verilator | ||
path: /opt | ||
|
||
- name: Unpack verilator binaries | ||
run: | | ||
cd /opt && tar -zxvf verilator.tar.gz | ||
- name: Run tests | ||
run: | | ||
export PATH=/opt/verilator/bin:$PATH | ||
export RV_ROOT=`pwd` | ||
export PYTHONUNBUFFERED=1 | ||
$RV_ROOT/configs/veer.config | ||
pytest verification/test.py -v --timeout=480 --html=test.html --html=$GITHUB_STEP_SUMMARY | ||
- name: Pack artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: results | ||
path: | | ||
test.html | ||
assets/ | ||
sim_build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
cocotb==1.7.2 | ||
cocotb-test==0.2.4 | ||
pytest-html | ||
pytest-xdist | ||
pytest-timeout | ||
pytest-md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters