Skip to content

Commit dadb2fa

Browse files
committed
Auto Clang Format
1 parent 306fdbe commit dadb2fa

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

.github/workflows/ci.yaml

+21-6
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,32 @@ jobs:
1616
library-manager: submit
1717
compliance: strict
1818

19-
formatting-check:
20-
name: Formatting Check
19+
format:
2120
runs-on: ubuntu-latest
2221
steps:
23-
- uses: actions/checkout@v4
24-
- name: Run clang-format style check for C/C++/Protobuf programs.
25-
uses: jidicula/clang-format-action@v4.13.0
22+
- uses: actions/checkout@v4
23+
with:
24+
ref: ${{ github.head_ref }}
25+
fetch-depth: 2
26+
27+
- uses: jayllyz/clang-format-action@v1
28+
# Default options
29+
with:
30+
check: false
31+
style: file
32+
extensions: cpp,h,hpp,c
33+
clang-version: latest
34+
35+
# commit the changes (if there are any)
36+
- name: Commit changes
37+
uses: stefanzweifel/git-auto-commit-action@v5
38+
with:
39+
commit_message: "clang-format ✅"
40+
branch: ${{ github.head_ref }}
2641

2742
test:
2843
runs-on: ubuntu-latest
29-
44+
needs: lint, format
3045
steps:
3146
- uses: actions/setup-python@v4
3247
with:

0 commit comments

Comments
 (0)