2022-02-05 06:48:58 +00:00
|
|
|
name: Clang Format Checker
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2022-02-11 14:09:44 +00:00
|
|
|
|
2022-02-05 06:48:58 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
- staged
|
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- ".github/**"
|
|
|
|
- "howto/**"
|
|
|
|
jobs:
|
2022-02-10 07:22:02 +00:00
|
|
|
formatting-check:
|
|
|
|
name: Formatting Check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
path:
|
2022-02-11 14:09:44 +00:00
|
|
|
- exclude: "(winlibs|maclibs)" # Exclude file paths containing "hello" or "world"
|
2022-02-10 07:22:02 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Run clang-format style check for C/C++/Protobuf programs.
|
|
|
|
uses: jidicula/clang-format-action@v4.5.0
|
|
|
|
with:
|
|
|
|
clang-format-version: '13'
|
2022-02-11 14:09:44 +00:00
|
|
|
# check-path: ${{ matrix.path['check'] }}
|
2022-02-10 07:22:02 +00:00
|
|
|
exclude-regex: ${{ matrix.path['exclude'] }}
|
|
|
|
fallback-style: 'llvm' # optional
|
2022-02-10 12:29:50 +00:00
|
|
|
|
2022-02-05 06:48:58 +00:00
|
|
|
clang-format-checking:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: RafikFarhad/clang-format-github-action@v1.0.1
|
2022-02-07 14:35:18 +00:00
|
|
|
with:
|
2022-02-08 03:41:00 +00:00
|
|
|
sources: "**/*.c,**/*.h,**/*.cc,**/*.hh,**/*.cpp,**/*.hpp"
|