Skip to content

Commit b5c3ce5

Browse files
committed
Switch clang-format action
1 parent a6e6b27 commit b5c3ce5

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/qa.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,28 @@ on:
88
branches:
99
- main
1010

11+
env:
12+
VERSION: 14
13+
1114
jobs:
1215
check-formatting:
1316
name: Check formatting
1417
runs-on: ubuntu-latest
1518
steps:
16-
- uses: actions/checkout@v4
19+
- name: Checkout source
20+
uses: actions/checkout@v4
1721

18-
- name: Clang-format style check
19-
uses: jidicula/clang-format-action@v4.13.0
20-
with:
21-
clang-format-version: "14"
22-
check-path: .
23-
exclude-regex: "./contrib/"
22+
- name: Install dependencies
23+
run: sudo apt-get install clang-format-${{ env.VERSION }}
24+
25+
- name: clang-format check
26+
run: |
27+
cmake_common_version="v3.4"
28+
script_name="project-clang-format.py"
29+
script_path="${{ github.workspace }}/$script_name"
30+
download_url="https://raw.githubusercontent.com/egor-tensin/cmake-common/$cmake_common_version/tools/$script_name"
31+
curl -s -o "$script_path" "$download_url"
32+
python3 "$script_path" --clang-format "clang-format-${{ env.VERSION }}" --style "file" --exclude "./contrib/"
2433
2534
analyze:
2635
name: analyze

0 commit comments

Comments
 (0)