Skip to content

[WIP] Add clang-tidy checks to CI #816

[WIP] Add clang-tidy checks to CI

[WIP] Add clang-tidy checks to CI #816

Workflow file for this run

name: Lint
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
spelling:
name: Check Spelling
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Check out Git repository
uses: actions/checkout@v6
- name: Install Requirements
run: |
python3 -m pip install --upgrade pip
# NOTE: There is nothing special about this version. We just need to
# fix it to something.
pip install codespell==2.4.1
- name: Check Spelling
run: codespell
PythonLint:
name: Python Lint
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Check out Git repository
uses: actions/checkout@v6
- name: Install Requirements
run: |
python3 -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint Python Files Using Pylint
run: ./dev/pylint_check.py
CppLint:
name: C/C++ Lint
runs-on: ubuntu-24.04
timeout-minutes: 60
env:
CLANG_TIDY: clang-tidy-19
RUN_CLANG_TIDY: run-clang-tidy-19
steps:
- name: Check out Git repository
uses: actions/checkout@v6
with:
submodules: true
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v3
id: cpu-cores
- name: Install Requirements
run: |
./install_apt_packages.sh
sudo apt-get install -y clang-tidy-19
- name: Configure Build Database
run: cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Lint VPR C/C++ Files Using Clang-Tidy
run: ./dev/run_linter.py -j${{ steps.cpu-cores.outputs.count }} vpr
- name: Lint librrgraph C/C++ Files Using Clang-Tidy
run: ./dev/run_linter.py -j${{ steps.cpu-cores.outputs.count }} libs/librrgraph
- name: Lint libarchfpga C/C++ Files Using Clang-Tidy
run: ./dev/run_linter.py -j${{ steps.cpu-cores.outputs.count }} libs/libarchfpga