forked from m5stack/M5Tab5-UserDemo
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (58 loc) · 1.56 KB
/
clang-format-check.yml
File metadata and controls
63 lines (58 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: clang-format Check
env:
INCLUDE_REGEX: ^.*\.((((c|C)(c|pp|xx|\+\+)?$)|((h|H)h?(pp|xx|\+\+)?$))|(inl|ino|pde|proto|cu))$
on:
push:
tags-ignore:
- '*.*.*'
- 'v*.*.*'
branches:
- '*'
paths:
- '*'
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**.inl'
- '**clang-format-check.yml'
- '**.clang-format'
pull_request:
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**.inl'
- '**clang-format-check.yml'
- '**.clang-format'
workflow_dispatch:
jobs:
formatting-check:
name: Formatting Check
runs-on: [self-hosted, Linux, X64]
strategy:
matrix:
include:
- check-path: './' # path to include
exclude-path: 'app/assets/images/|platforms/tab5/components/' # path to exclude
#- check: 'src'
# exclude: '(Fonts)' # Exclude file paths containing "Fonts"
#- check: 'examples'
# exclude: ''
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: false
submodules: recursive
ref: ${{ github.event.pull_request.head.sha }}
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/clang-format-action@v4.10.2 # Using include-regex 10.x or later
with:
clang-format-version: '13'
check-path: ${{ matrix.check-path }}
exclude-regex: ${{ matrix.exclude-path }}
include-regex: ${{ env.INCLUDE_REGEX }}