Skip to content

Commit 51a82a8

Browse files
committed
ci: Add github CodeQL configuration
Signed-off-by: GitHub <noreply@github.com>
1 parent 5fe89f9 commit 51a82a8

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ master ]
9+
schedule:
10+
- cron: '18 10 * * 3'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'cpp' ]
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v2
29+
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v1
32+
with:
33+
languages: ${{ matrix.language }}
34+
35+
- name: Install Prerequisites
36+
shell: bash
37+
run: sudo apt install -y ninja-build libpopt-dev
38+
39+
- name: Build
40+
shell: bash
41+
run: |
42+
mkdir $PWD/build
43+
cmake -S . -B build -GNinja \
44+
-DCMAKE_BUILD_TYPE=Release \
45+
-DBUILD_EXAMPLES=ON \
46+
-DBUILD_TOOLS=ON
47+
cmake --build build
48+
49+
- name: Perform CodeQL Analysis
50+
uses: github/codeql-action/analyze@v1

0 commit comments

Comments
 (0)