Skip to content

Commit 3508895

Browse files
committed
CI: Add CodeQL static code analysis
This commit introduces a GitHub Actions workflow for CodeQL to perform static analysis onthe C/C++ codebase. Signed-off-by: Damien Chen <[email protected]>
1 parent d75c1da commit 3508895

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "CodeQL"
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
analyze:
9+
runs-on: ubuntu-24.04
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v6
13+
14+
- name: Install build dependencies
15+
run: |
16+
sudo apt-get update
17+
sudo apt-get install -y --no-install-recommends build-essential qemu-system-riscv32 wget
18+
19+
- name: Setup toolchain
20+
run: .ci/setup-toolchain.sh gnu
21+
22+
- name: Initialize CodeQL
23+
uses: github/codeql-action/init@v4
24+
with:
25+
languages: cpp
26+
27+
- name: Build
28+
run: make -j$(nproc)
29+
30+
- name: Run CodeQL analysis
31+
uses: github/codeql-action/analyze@v4

0 commit comments

Comments
 (0)