-
Notifications
You must be signed in to change notification settings - Fork 29
157 lines (146 loc) · 3.9 KB
/
lint.yml
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# Copyright 2023 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
# Authors:
# - Paul Scheffler <paulsc@iis.ee.ethz.ch>
# - Thomas Benz <tbenz@iis.ee.ethz.ch>
name: lint
on:
push:
branches-ignore:
- '__deploy__**'
pull_request:
branches-ignore:
- '__deploy__**'
workflow_dispatch:
branches-ignore:
- '__deploy__**'
jobs:
lint-license:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Check license
uses: pulp-platform/pulp-actions/lint-license@v2
with:
license: |
Copyright (\d{4}(-\d{4})?\s)?(ETH Zurich and University of Bologna|lowRISC contributors).
(Solderpad Hardware License, Version 0.51|Licensed under the Apache License, Version 2.0), see LICENSE for details.
SPDX-License-Identifier: (SHL-0.51|Apache-2.0)
# Exclude generated headers (no license checker support for optional lines)
exclude_paths: |
target/sim/vsim/wave/tpl/*.do.tpl
lint-sv:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Run Verible
uses: chipsalliance/verible-linter-action@main
with:
paths: src
extra_args: "--waiver_files .github/verible.waiver"
github_token: ${{ secrets.GITHUB_TOKEN }}
fail_on_error: true
reviewdog_reporter: github-check
# lint-cxx:
# runs-on: ubuntu-latest
# steps:
# -
# name: Checkout
# uses: actions/checkout@v3
# -
# name: Run Clang-format
# uses: DoozyX/clang-format-lint-action@v0.14
# with:
# extensions: 'c,h,cpp'
# clangFormatVersion: 14
# style: >
# {
# IndentWidth: 4,
# ColumnLimit: 100,
# AlignEscapedNewlines: DontAlign,
# SortIncludes: false,
# AllowShortFunctionsOnASingleLine: None,
# AllowShortIfStatementsOnASingleLine: true,
# AllowShortLoopsOnASingleLine: true
# }
lint-python:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.9
-
name: Lint Python
uses: py-actions/flake8@v2
with:
max-line-length: "100"
ignore: E128
lint-yaml:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.9
-
name: Lint Yaml
uses: ibiqlik/action-yamllint@v3
with:
file_or_dir: Bender.yml src/db/*.yml
config_file: .github/yamllint-conf.yml
lint-commit:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v3
if: ${{ github.event_name == 'push' }}
-
uses: actions/checkout@v3
if: ${{ github.event_name == 'pull_request' }}
with:
ref: ${{ github.event.pull_request.head.sha }}
-
uses: actions/setup-python@v2
with:
python-version: '3.9'
cache: 'pip'
-
name: Python Requirements
run: python3 -m pip install -r requirements.txt
-
name: Lint commits
run: python3 util/lint-commits.py HEAD
lint-author:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
-
name: Python Requirements
run: pip install -r requirements.txt
-
name: Lint authors
run: python3 util/lint-authors.py .github/authors-cfg.yaml