Hypervisor extension (#1938) #3
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
# Copyright 2021 OpenHW Group | |
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | |
# SPDX-License-Identifier: Apache-2.0 | |
# Run functional regression checks | |
name: ci | |
on: [push, pull_request] | |
jobs: | |
build-riscv-tests: | |
name: build-riscv-tests | |
runs-on: ubuntu-latest | |
env: | |
NUM_JOBS: 8 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Cache toolchain | |
id: cache-toolchain | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-toolchain | |
with: | |
path: tools/riscv-toolchain/ | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('ci/install-toolchain.sh') }} | |
- name: Cache verilator | |
id: cache-verilator | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-verilator | |
with: | |
path: tools/verilator/ | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('verif/regress/install-verilator.sh') }} | |
- name: Cache Spike | |
id: cache-spike | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-spike | |
with: | |
path: tools/spike/ | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('verif/regress/install-spike.sh', 'verif/core-v-verif/vendor/riscv/riscv-isa-sim/') }} | |
- name: Prepare | |
run: | | |
ci/setup.sh | |
execute-riscv-tests: | |
name: execute-riscv-tests | |
runs-on: ubuntu-latest | |
env: | |
SPIKE_TANDEM: 1 | |
strategy: | |
matrix: | |
testcase: [ dv-riscv-arch-test , smoke-tests ] | |
target: [ veri-testharness ] | |
needs: | |
build-riscv-tests | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Cache toolchain | |
id: cache-toolchain | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-toolchain | |
with: | |
path: tools/riscv-toolchain/ | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('ci/install-toolchain.sh') }} | |
- name: Cache verilator | |
id: cache-verilator | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-verilator | |
with: | |
path: tools/verilator/ | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('verif/regress/install-verilator.sh') }} | |
- name: Cache Spike | |
id: cache-spike | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-spike | |
with: | |
path: tools/spike/ | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('verif/regress/install-spike.sh', 'verif/core-v-verif/vendor/riscv/riscv-isa-sim/') }} | |
- name: Run Tests | |
run: | | |
set -x | |
export RISCV=$(pwd)/tools/riscv-toolchain/ | |
source ci/install-prereq.sh | |
source verif/sim/setup-env.sh | |
DV_SIMULATORS=${{matrix.target}} bash verif/regress/${{matrix.testcase}}.sh | |
- name: Upload Lint Report to Github | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{matrix.target}}.${{matrix.testcase}} | |
path: 'verif/sim/out*' | |
retention-days: 10 | |
compression-level: 9 |