Skip to content

Refactored iseg hardware layer #394

Refactored iseg hardware layer

Refactored iseg hardware layer #394

name: Regression Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
lint-flake8:
runs-on: ubuntu-latest
name: flake8
strategy:
fail-fast: false
matrix:
python-version: [3.11]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v2
with:
python-version: ${{matrix.python-version}}
- name: flake8
run: |
pip install flake8
flake8
tests:
name: Python ${{matrix.python-version}} | ${{matrix.sim}}
runs-on: ubuntu-22.04
env:
SIM: ${{matrix.sim}}
strategy:
fail-fast: false
matrix:
include:
- sim: icarus
python-version: '3.11'
- sim: icarus
python-version: '3.10'
- sim: verilator
sim-version: v5.020
python-version: '3.10'
pytest-marker: "-m verilator"
steps:
- uses: actions/checkout@v1
- name: Set up Anaconda ${{matrix.python-version}}
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{matrix.python-version}}
- name: Install Conda dependencies
shell: bash -l {0}
run: |
conda info -a
conda install numpy bitarray nose pyyaml coverage six
- name: Install Python dependencies
shell: bash -l {0}
run: |
pip install pyvisa pyvisa-sim pytest coveralls pytest-cov cocotb>=1.8.1 cocotb-bus gitpython
- name: Install Verilator
if: matrix.sim == 'verilator'
run: |
sudo apt install -y --no-install-recommends make g++ help2man perl autoconf flex bison libfl2 libfl-dev zlib1g zlib1g-dev
git clone https://github.com/verilator/verilator.git -b ${{matrix.sim-version}}
cd verilator
autoconf
./configure
make -j $(nproc)
sudo make install
- name: Install Icarus Verilog
if: matrix.sim == 'icarus'
run: |
sudo apt install -y --no-install-recommends iverilog
- name: Install basil
shell: bash -l {0}
run: |
pip install -e .
- name: Test
shell: bash -l {0}
run: |
pip install -e .
pytest ${{matrix.pytest-marker}} --cov=basil tests/test_*.py examples/*/*/test_*.py
- name: Upload to codecov
shell: bash -l {0}
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}