File tree 1 file changed +16
-2
lines changed
1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 5
5
- main
6
6
pull_request :
7
7
types : [opened, synchronize, reopened]
8
+ env :
9
+ CLANG_VERSION : 18
8
10
jobs :
9
11
build :
10
12
name : Build
@@ -15,10 +17,22 @@ jobs:
15
17
fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
16
18
- name : Install sonar-scanner
17
19
uses : sonarsource/sonarcloud-github-c-cpp@v3
18
- - name : Generate compilation database
20
+ - name : Install Ninja
21
+ run : |
22
+ wget https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip
23
+ sudo unzip ninja-linux.zip -d /usr/local/bin
24
+ - name : Install clang
25
+ run : |
26
+ sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ${{env.CLANG_VERSION}}
27
+ sudo apt install -y clang-tools-${{env.CLANG_VERSION}} libc++-${{env.CLANG_VERSION}}-dev
28
+ - name : Generate compilation database and build
19
29
run : |
20
30
mkdir build
21
- cmake -S . -B build
31
+ cmake -S . -B build -G Ninja \
32
+ -DCMAKE_CXX_COMPILER=clang++-${{env.CLANG_VERSION}} \
33
+ -DCMAKE_CXX_COMPILER_CLANG_SCAN_DEPS=clang-scan-deps-${{env.CLANG_VERSION}}
34
+ # The project needs to be built so the `.modmap` files are generated
35
+ cmake --build build --target all
22
36
- name : Run sonar-scanner
23
37
env :
24
38
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments