Save artifacts #55
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: Prepare | |
run: | | |
ci/setup.sh | |
- name: Cache tools | |
id: cache-tools | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-tools | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: tools/ | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('verif/core-v-verif/vendor/riscv/', | |
'verif/regress/install-verilator.sh', 'verif/regress/install-spike.sh', 'ci/') }} | |
execute-riscv-tests: | |
name: execute-riscv-tests | |
runs-on: ubuntu-latest | |
env: | |
SPIKE_TANDEM: 1 | |
strategy: | |
matrix: | |
testcase: [ verif/regress/dv-riscv-arch-test.sh , verif/regress/smoke-tests.sh ] | |
target: [ veri-testharness ] | |
needs: | |
build-riscv-tests | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Cache tools | |
id: cache-tools | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-tools | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: tools/ | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('verif/core-v-verif/vendor/riscv/', | |
'verif/regress/install-verilator.sh', 'verif/regress/install-spike.sh', 'ci/') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
- name: Run Tests | |
run: | | |
./tools/spike/bin/spike -v || ./tools/bin/verilator -v | |
set -x | |
export RISCV=$(pwd)/tools/riscv-toolchain/ | |
source verif/sim/setup-env.sh | |
DV_SIMULATORS=${{matrix.target}} bash ${{matrix.testcase}} | |
- name: Upload Lint Report to Github | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{matrix.target}}-${{matrix.testcase}} | |
path: verif/sim/out* | |
retention-days: 10 | |