mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Clang Format Checker
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- dev
|
|
- staged
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- ".github/**"
|
|
- "howto/**"
|
|
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"
|