Skip to content

Commit 4bab5f3

Browse files
committed
ci: add CodeQL analysis workflow (#243)
1 parent 616065a commit 4bab5f3

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/codeql-analysis.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ concurrency:
1212
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1313
cancel-in-progress: true
1414

15+
env:
16+
# Match .github/workflows/build.yml (plain Release; no LSan — avoids sanitizer/CodeQL interaction)
17+
BUILD_TYPE: Release
18+
1519
jobs:
1620
analyze:
1721
name: Analyze (cpp)
@@ -26,15 +30,19 @@ jobs:
2630
uses: github/codeql-action/init@v4
2731
with:
2832
languages: cpp
33+
build-mode: manual
2934
config: |
3035
paths-ignore:
3136
- libCacheSim-node
3237
3338
- name: Install build dependencies
3439
run: bash scripts/install_dependency.sh
3540

36-
- name: Autobuild
37-
uses: github/codeql-action/autobuild@v4
41+
- name: Configure CMake
42+
run: cmake -G Ninja -B "${{ github.workspace }}/build" -DCMAKE_BUILD_TYPE="${{ env.BUILD_TYPE }}"
43+
44+
- name: Build
45+
run: ninja -C "${{ github.workspace }}/build"
3846

3947
- name: Perform CodeQL Analysis
4048
uses: github/codeql-action/analyze@v4

0 commit comments

Comments
 (0)