Publish unit test logs to GitHub Pages #451
Workflow file for this run
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
name: VeeR-EL2 CI | |
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 | |
- 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.002 | |
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: Regression tests | |
runs-on: ubuntu-latest | |
needs: verilator | |
env: | |
DEBIAN_FRONTEND: "noninteractive" | |
TESTS: "hello_world hello_world_dccm hello_world_iccm cmark cmark_dccm cmark_iccm dhry" | |
steps: | |
- name: Install utils | |
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 | |
- 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: Setup repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
path: Caliptra | |
- name: Setup repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Run tests | |
run: | | |
export PATH=/opt/verilator/bin:$PATH | |
export RV_ROOT=`pwd` | |
bash .github/scripts/run_tests.sh | |
- name: Pack artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: results | |
path: ./results/ |