-
Notifications
You must be signed in to change notification settings - Fork 12
72 lines (65 loc) · 1.99 KB
/
hw_linting.yaml
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
name: RTL Linting
on: push
jobs:
changes:
uses: ./.github/workflows/filter.yaml
lint-python:
needs: changes
if: ${{ needs.changes.outputs.hardware == 'true' }}
name: Linting Python with PyLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Lint with pylint
run: |
$CONDA/bin/conda install -c conda-forge pylint=2.17.1
$CONDA/bin/pylint --reports yes hardware/util/* hardware/target/dv/**/*.py hardware/analysis/*.py
typechecking-python:
needs: changes
if: ${{ needs.changes.outputs.algorithmic == 'true' }}
runs-on: ubuntu-latest
container: # use gpu env as mypy does not work in hw env
image: ghcr.io/joennlae/halutmatmul-conda-gpu:latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v3
- name: Check types with mypy
run: |
source /venv/bin/activate
mypy hardware/util hardware/target/dv/**/*.py
hw-lint-verilator:
needs: changes
if: ${{ needs.changes.outputs.hardware == 'true' }}
runs-on: ubuntu-latest
container:
image: ghcr.io/joennlae/halutmatmul-conda-hw:latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v3
- name: Lint RTL with verilator
run: |
source /venv/bin/activate
cd hardware
make halut-lint-verilator
hw-lint-verilate:
needs: changes
if: ${{ needs.changes.outputs.hardware == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Verible
uses: chipsalliance/verible-linter-action@main
with:
paths: hardware/rtl
extra_args: "--waiver_files .github/verible.waiver"
github_token: ${{ secrets.GITHUB_TOKEN }}
fail_on_error: true
reviewdog_reporter: github-check