File tree Expand file tree Collapse file tree 2 files changed +13
-23
lines changed
Expand file tree Collapse file tree 2 files changed +13
-23
lines changed Original file line number Diff line number Diff line change 1111
1212jobs :
1313 lint :
14- runs-on : windows -latest
14+ runs-on : ubuntu -latest
1515 steps :
1616 - name : Checkout last commit
1717 uses : actions/checkout@v4
18- - name : Install clang-format@18
19- shell : pwsh
18+
19+ - name : Install clang-format-18
2020 run : |
21- $version = ""
22- if (Get-Command "clang-format" -ErrorAction SilentlyContinue){
23- $version = clang-format --version
24- $pat = ".*\s+(\d+\.\d+\.\d+)"
25- if ($version -match $pat) {
26- $version = $matches[1]
27- }
28- }
29- if ($version -ne "") {
30- Write-Host "clang-format version:$version"
31- if ([version]$version -eq [version]"18.1.8") {
32- Write-Host "clang-format OK"
33- } else {
34- Write-Host "clang-format version does not meet"
35- choco install llvm --version=18.1.8 --force
36- }
37- } else {
38- Write-Host "clang-format not installed"
39- choco install llvm --version=18.1.8
40- }
21+ ./action-install-clang-format.sh 18
22+
4123 - name : Code style lint
4224 run : make clang-format-lint
4325
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # https://apt.llvm.org/
4+ sudo apt install -y wget
5+ wget https://apt.llvm.org/llvm.sh
6+ chmod +x llvm.sh
7+ sudo ./llvm.sh $1
8+ sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-$1 100
You can’t perform that action at this time.
0 commit comments