-
Notifications
You must be signed in to change notification settings - Fork 196
62 lines (53 loc) · 1.45 KB
/
codeql.yml
File metadata and controls
62 lines (53 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: CodeQL Analysis
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '0 2 * * 0' # Weekly on Sunday at 2 AM UTC
jobs:
analyze:
name: CodeQL C++
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ['cpp']
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v5
with:
submodules: recursive
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
language: ${{ matrix.language }}
queries: security-and-quality
config-file: ./.github/codeql/codeql-config.yml
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake
- name: Configure CMake
run: |
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCSV_CXX_STANDARD=20 \
-DCSV_BUILD_PROGRAMS=OFF \
-DCSV_BUILD_TESTS=OFF \
-DBUILD_PYTHON=OFF \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_C_COMPILER=gcc
- name: Build for CodeQL analysis
run: cmake --build build --config Release
- name: Run CodeQL analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"