Allow SC 0.14 as dependency of Switchboard #84
Workflow file for this run
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
# modified from https://github.com/siliconcompiler/siliconcompiler/blob/main/.github/workflows/lint.yml | |
name: Lint | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
lint_python: | |
name: Lint Python Code | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- {python: "3.11", os: "ubuntu-latest"} | |
runs-on: ${{ matrix.version.os }} | |
timeout-minutes: 5 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.version.python }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.version.python }} | |
- name: Install Requirements | |
run: python3 -m pip install flake8 | |
- name: Lint with Flake8 | |
run: flake8 --statistics . | |
lint_verilog: | |
name: Lint Verilog Code | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Set up Verible | |
run: | | |
apt-get update && apt-get install -y wget | |
wget https://github.com/chipsalliance/verible/releases/download/v0.0-3303-gd87f2420/verible-v0.0-3303-gd87f2420-linux-static-x86_64.tar.gz | |
tar xzf verible-v*.tar.gz | |
rm verible-v*.tar.gz | |
mv verible-v* verible | |
- name: Lint with Verible | |
run: | | |
find . \( \ | |
-name "*.v" \ | |
-or -name "*.sv" \ | |
-or -name "*.vh" \ | |
-or -name "*.svh" \ | |
\) -not \( \ | |
-path "./switchboard/deps/*" \ | |
-or -path "./examples/deps/*" \ | |
-or -name "axil_interconnect_wrap_1x2.v" \ | |
-or -name "picorv32.v" \ | |
\) > files.txt | |
cat files.txt | |
./verible/bin/verible-verilog-lint \ | |
--rules_config verible_lint.txt \ | |
`cat files.txt` | |
lint_cc: | |
name: Lint C/C++ Code Style | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Gather files | |
run: | | |
find . \( \ | |
-name "*.c" \ | |
-or -name "*.cc" \ | |
-or -name "*.h" \ | |
-or -name "*.hpp" \ | |
\) -not \( \ | |
-path "./switchboard/deps/*" \ | |
-or -path "./examples/deps/*" \ | |
\) > files.txt | |
cat files.txt | |
- name: Lint with clang-format | |
run: | | |
clang-format-14 --dry-run -Werror `cat files.txt` |