-
Notifications
You must be signed in to change notification settings - Fork 30
91 lines (74 loc) · 2.16 KB
/
Copy pathregression-tests.yml
File metadata and controls
91 lines (74 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Regression Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: pre-commit/action@v3.0.1
tests:
name: Python ${{matrix.python-version}} | ${{matrix.sim}}
runs-on: ubuntu-24.04
env:
SIM: ${{matrix.sim}}
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
include:
- sim: icarus
python-version: '3.10'
- sim: icarus
python-version: '3.11'
- sim: icarus
python-version: '3.12'
- sim: icarus
python-version: '3.13'
- sim: verilator
sim-version: 5.044
python-version: '3.10'
pytest-marker: "-m verilator"
steps:
- uses: actions/checkout@v6
- name: Set up miniforge ${{matrix.python-version}}
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
python-version: ${{matrix.python-version}}
conda-remove-defaults: "true" # explicitly remove conda default channel in favor of conda-forge
- name: Install verilator
if: matrix.sim == 'verilator'
shell: bash -l {0}
run: |
conda install verilator==${{matrix.sim-version}}
- name: Install Icarus Verilog
if: matrix.sim == 'icarus'
run: |
sudo apt install -y --no-install-recommends iverilog
- name: Install Python dependencies
shell: bash -l {0}
run: |
pip install pyvisa pyvisa-sim pytest coverage coveralls pytest-cov cocotb>=2 cocotb-bus
- name: Install basil
shell: bash -l {0}
run: |
pip install -e .
- name: Test
shell: bash -l {0}
run: |
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}