-
Notifications
You must be signed in to change notification settings - Fork 39
63 lines (52 loc) · 1.46 KB
/
codeql.yml
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
#
# CodeQl Workflow
#
# https://github.com/cpp-best-practices/gui_starter_template
name: CodeQL
on:
push:
branches: [ release, next ]
pull_request:
branches: [ release, next ]
# At 3:00am on Friday. Every week, every month.
schedule:
- cron: '00 3 * * 5'
jobs:
analyze:
strategy:
fail-fast: false
matrix:
cxx_compiler:
- clang++
build_type:
- Debug
install_location:
- .local
name: Analyze
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip ci codeql]')"
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@v3
- name: Setup Cache
uses: actions/cache@v3
id: cache
with:
path: |
${{github.workspace}}/${{matrix.install_location}}
${{github.workspace}}/build/out
key: ${{runner.os}}-codeql-dependencies
- name: Setup CodeQL
uses: github/codeql-action/init@v2
with:
languages: 'cpp'
- name: Build
run: |
export CXX="$(which "${{matrix.cxx_compiler}}")"
cmake -S . -B build/out/this/codeql -DCMAKE_BUILD_TYPE="${{matrix.build_type}}"
cmake --build build/out/this/codeql --config "${{matrix.build_type}}"
- name: Analyze
uses: github/codeql-action/analyze@v2