Skip to content

Commit a3a01ea

Browse files
authored
Merge pull request #350 from MegaGlest/ci/fix-format-check
CI: Specify clang-format version
2 parents c6823ee + ced5003 commit a3a01ea

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/check-formatting.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,21 @@ on:
2323
- 'source/**/*.hpp'
2424
- '**/check-formatting.yml'
2525

26+
# If the clang-format version is different than the version used to
27+
# format the files, the check will on some files
28+
2629
jobs:
2730
clang-format:
28-
runs-on: ubuntu-latest
31+
runs-on: ubuntu-24.04
32+
env:
33+
CLANG_FORMAT_VERSION: 19
2934

3035
steps:
3136
- name: Checkout repository
3237
uses: actions/checkout@v4
3338

3439
- name: Install clang-format
35-
run: sudo apt-get install -y clang-format
40+
run: sudo apt-get install -y clang-format-${CLANG_FORMAT_VERSION}
3641

3742
- name: Run clang-format check
3843
run: |
@@ -42,5 +47,5 @@ jobs:
4247
-path "./shared_lib/*/libircclient" -o \
4348
-path "./shared_lib/*/platform/miniupnpc" -o \
4449
-path "./shared_lib/*/feathery_ftp" \
45-
\) -prune -o -type f \( -name '*.cpp' -o -name '*.h' \) -print | xargs clang-format --dry-run --Werror
50+
\) -prune -o -type f \( -name '*.cpp' -o -name '*.h' \) -print | xargs clang-format-${CLANG_FORMAT_VERSION} --dry-run --Werror
4651

0 commit comments

Comments
 (0)