CoCoTB Regression Tests #42
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: CoCoTB Regression Tests | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' # weekly | |
jobs: | |
run_tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.10.6] | |
env: | |
SIM: ghdl | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install cocotb-coverage | |
pip install cocotb-test | |
pip install pytest | |
pip install pytest-parallel | |
pip install pytest-xdist | |
- uses: ghdl/setup-ghdl-ci@nightly | |
with: | |
backend: llvm | |
- run: | | |
ghdl --version | |
$GHDL --version | |
- name: regression | |
run: | | |
cd cocotb_sim/ && make | |
- name: regression result | |
run: | | |
cd cocotb_sim/ && var=$(cat results.xml | grep -o -E 'failure' | head -1 | cut -f2- -d\") | |
if [ "$var" = "failure" ]; then exit 1; else exit 0; fi |