1+ # For most projects, this workflow file will not need changing; you simply need
2+ # to commit it to your repository.
3+ #
4+ # You may wish to alter this file to override the set of languages analyzed,
5+ # or to provide custom queries or build logic.
6+ #
7+ # ******** NOTE ********
8+ # We have attempted to detect the languages in your repository. Please check
9+ # the `language` matrix defined below to confirm you have the correct set of
10+ # supported CodeQL languages.
11+ #
12+ name : " CodeQL"
13+
14+ on :
15+ push :
16+ branches : [ main, dev ]
17+ pull_request :
18+ # The branches below must be a subset of the branches above
19+ branches : [ main, dev ]
20+
21+
22+ jobs :
23+ analyze :
24+ name : Analyze
25+ runs-on : ubuntu-latest
26+ permissions :
27+ actions : read
28+ contents : read
29+ security-events : write
30+
31+ strategy :
32+ fail-fast : false
33+ matrix :
34+ language : [ 'cpp' ]
35+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
36+ # Learn more about CodeQL language support at https://git.io/codeql-language-support
37+ compiler :
38+ # you can specify the version after `-` like "llvm-13.0.0".
39+ - gcc-14
40+ generator :
41+ - " Ninja Multi-Config"
42+ build_type :
43+ - Debug
44+ packaging_maintainer_mode :
45+ - ON
46+
47+
48+ steps :
49+ - uses : actions/checkout@v3
50+
51+ - name : Setup Cache
52+ uses : ./.github/actions/setup_cache
53+ with :
54+ compiler : ${{ matrix.compiler }}
55+ build_type : ${{ matrix.build_type }}
56+ packaging_maintainer_mode : ${{ matrix.packaging_maintainer_mode }}
57+ generator : ${{ matrix.generator }}
58+
59+ - name : Setup Cpp
60+ uses : aminya/setup-cpp@v1
61+ with :
62+ compiler : ${{ matrix.compiler }}
63+ vcvarsall : ${{ contains(matrix.os, 'windows' )}}
64+
65+ cmake : true
66+ ninja : true
67+ vcpkg : false
68+ ccache : true
69+ clangtidy : false
70+
71+ cppcheck : false
72+
73+ gcovr : false
74+ opencppcoverage : false
75+
76+ # make sure coverage is only enabled for Debug builds, since it sets -O0 to make sure coverage
77+ # has meaningful results
78+ - name : Configure CMake
79+ run : |
80+ cmake -S . -B ./build -G "${{matrix.generator}}" -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -DVMAware_PACKAGING_MAINTAINER_MODE:BOOL=${{matrix.packaging_maintainer_mode}} -DVMAware_ENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }}
81+
82+ # Initializes the CodeQL tools for scanning.
83+ - name : Initialize CodeQL
84+ uses : github/codeql-action/init@v3
85+ with :
86+ languages : ${{ matrix.language }}
87+ # If you wish to specify custom queries, you can do so here or in a config file.
88+ # By default, queries listed here will override any specified in a config file.
89+ # Prefix the list here with "+" to use these queries and those in the config file.
90+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
91+
92+
93+ - name : Build
94+ # Execute the build. You can specify a specific target with "--target <NAME>"
95+ run : |
96+ cmake --build ./build --config ${{matrix.build_type}}
97+
98+ - name : Perform CodeQL Analysis
99+ uses : github/codeql-action/analyze@v2
0 commit comments