File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Clang-Format Workflow
2+
3+ on :
4+ push :
5+ branches : ' **'
6+ pull_request :
7+
8+ env :
9+ LLVM_VERSION : 18
10+
11+ jobs :
12+ format :
13+ name : Check the formatting
14+ runs-on : windows-latest
15+
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0
21+
22+ - name : Pin to a specific version
23+ run : |
24+ $latestChocoVersion = (Resolve-ChocoPackageVersion -PackageName "llvm" -TargetVersion $env:LLVM_VERSION)
25+ Install-ChocoPackage -PackageName llvm -ArgumentList '--allow-downgrade', '--version', $latestChocoVersion
26+
27+ - name : Run clang-format
28+ env :
29+ RED4EXT_COMMIT_BEFORE : ${{ github.event.pull_request.base.sha || github.event.before }}
30+ RED4EXT_COMMIT_AFTER : ${{ github.sha }}
31+ run : |
32+ git `
33+ -c core.autocrlf=false `
34+ -c core.eol=lf `
35+ -c color.ui=always `
36+ clang-format `
37+ --style file `
38+ --diff $env:RED4EXT_COMMIT_BEFORE $env:RED4EXT_COMMIT_AFTER `
You can’t perform that action at this time.
0 commit comments