40 lines
831 B
YAML
40 lines
831 B
YAML
name: "Lint Clang"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
- ready_for_review
|
|
|
|
permissions:
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
lint-clang:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Python venv
|
|
uses: ./.github/actions/init-python
|
|
with:
|
|
cache-key: "lint-clang"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
source .venv/bin/activate
|
|
pip install pyyaml clang_format
|
|
|
|
- name: Linting with Clang format
|
|
id: lint-clang
|
|
uses: ./.github/actions/lint-error
|
|
with:
|
|
format-command: ./scripts/lint_clang.py -f
|
|
format-tool: "clang-format"
|
|
comment-header: "lint-clang"
|