goldendict-ng/.github/workflows/clang-format.yml
xiaoyifang c4ecd9ab7b action: add condition to clang-format check
winlibs: remove lib/msvc/libao-4.dll
2022-02-12 18:28:19 +08:00

44 lines
1.1 KiB
YAML

name: Clang Format Checker
on:
workflow_dispatch:
push:
paths-ignore:
- 'docs/**'
- ".github/**"
- "howto/**"
- "winlibs/**"
pull_request:
branches:
- dev
- staged
paths-ignore:
- 'docs/**'
- ".github/**"
- "howto/**"
- "winlibs/**"
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
strategy:
matrix:
path:
- exclude: "(winlibs|maclibs)" # Exclude file paths containing "hello" or "world"
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'
# check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }}
fallback-style: 'llvm' # optional
clang-format-checking:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: RafikFarhad/clang-format-github-action@v1.0.1
with:
sources: "**/*.c,**/*.h,**/*.cc,**/*.hh,**/*.cpp,**/*.hpp"