-
-
Notifications
You must be signed in to change notification settings - Fork 2k
64 lines (55 loc) · 1.59 KB
/
analysis.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
63
64
name: "CodeQL"
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
codeql:
name: 🐛 CodeQL
runs-on: ubuntu-22.04
permissions:
actions: read
contents: read
security-events: write
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: ✋ Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: 'cpp'
- name: 📜 Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ runner.os }}-analysis-build-${{ github.run_id }}
restore-keys: ${{ runner.os }}-analysis-build
max-size: 50M
- name: 📜 Restore CMakeCache
uses: actions/cache@v4
with:
path: |
build/CMakeCache.txt
key: ${{ runner.os }}-analysis-build-${{ hashFiles('**/CMakeLists.txt') }}
- name: ⬇️ Install dependencies
run: |
sudo apt update
sudo bash dist/get_deps_debian.sh
- name: 🛠️ Build
run: |
set -x
mkdir -p build
cd build
CC=gcc-12 CXX=g++-12 cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DIMHEX_PATTERNS_PULL_MASTER=ON \
..
make -j 4 install
- name: 🗯️ Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2