Improvements for mercury driver #324
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: 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.8] | |
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-20.04 | |
env: | |
SIM: ${{matrix.sim}} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- sim: icarus | |
python-version: 3.7 | |
- sim: icarus | |
python-version: 3.8 | |
- sim: verilator | |
sim-version: v4.106 | |
python-version: 3.8 | |
pytest-marker: "-m verilator" | |
steps: | |
- uses: actions/checkout@v1 | |
- 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.5.2 | |
- name: Install Verilator | |
if: matrix.sim == 'verilator' | |
run: | | |
sudo apt install -y --no-install-recommends make g++ perl python3 autoconf flex bison libfl2 libfl-dev zlibc 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} |