mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
ci(workflow): update format check to use LLVM 22
This commit is contained in:
15
.github/workflows/format-check.yml
vendored
15
.github/workflows/format-check.yml
vendored
@@ -1,4 +1,3 @@
|
|||||||
# .github/workflows/format-check.yml
|
|
||||||
name: Code Format Check
|
name: Code Format Check
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
@@ -9,9 +8,19 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
formatting:
|
formatting:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: silkeh/clang:21
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install LLVM 22
|
||||||
|
run: |
|
||||||
|
wget https://apt.llvm.org/llvm.sh
|
||||||
|
chmod +x llvm.sh
|
||||||
|
sudo ./llvm.sh 22
|
||||||
|
clang-format-22 --version
|
||||||
|
|
||||||
- name: Run clang-format
|
- name: Run clang-format
|
||||||
run: |
|
run: |
|
||||||
find src include -name '*.cpp' -o -name '*.hpp' -print0 | xargs -0 clang-format --dry-run --Werror
|
find src include \
|
||||||
|
\( -name '*.cpp' -o -name '*.hpp' \) \
|
||||||
|
-print0 | xargs -0 clang-format-22 --dry-run --Werror
|
||||||
Reference in New Issue
Block a user