mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 17:24:08 +00:00
38 lines
996 B
YAML
38 lines
996 B
YAML
name: Clang Format Checker
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
pull_request:
|
|
branches:
|
|
- dev
|
|
- staged
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- ".github/**"
|
|
- "howto/**"
|
|
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"
|