2021-10-09 23:15:08 +02:00
|
|
|
name: "CodeQL"
|
2021-08-29 14:26:50 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
2021-10-09 23:15:08 +02:00
|
|
|
- cron: '0 0 * * *'
|
2022-06-29 00:24:53 +02:00
|
|
|
workflow_dispatch:
|
2021-08-29 14:26:50 +02:00
|
|
|
|
|
|
|
jobs:
|
2021-10-09 23:30:35 +02:00
|
|
|
codeql:
|
|
|
|
name: 🐛 CodeQL
|
2022-06-25 12:19:59 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2021-08-29 14:26:50 +02:00
|
|
|
permissions:
|
|
|
|
actions: read
|
|
|
|
contents: read
|
|
|
|
security-events: write
|
|
|
|
|
|
|
|
steps:
|
2021-09-11 18:58:53 +02:00
|
|
|
- name: 🧰 Checkout
|
2024-01-28 22:10:37 +01:00
|
|
|
uses: actions/checkout@v4
|
2021-08-29 14:40:10 +02:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-08-29 14:26:50 +02:00
|
|
|
|
2021-09-11 18:58:53 +02:00
|
|
|
- name: ✋ Initialize CodeQL
|
2022-06-23 23:48:02 +02:00
|
|
|
uses: github/codeql-action/init@v2
|
2021-08-29 14:26:50 +02:00
|
|
|
with:
|
2021-09-11 19:37:20 +02:00
|
|
|
languages: 'cpp'
|
2021-08-29 14:26:50 +02:00
|
|
|
|
2022-10-10 20:37:00 +02:00
|
|
|
- name: 📜 Setup ccache
|
2024-01-30 21:19:25 +01:00
|
|
|
uses: hendrikmuhs/ccache-action@v1
|
2021-09-19 21:49:09 +02:00
|
|
|
with:
|
2023-10-04 22:23:41 +02:00
|
|
|
key: ${{ runner.os }}-analysis-build-${{ github.run_id }}
|
|
|
|
restore-keys: ${{ runner.os }}-analysis-build
|
2022-10-10 20:37:00 +02:00
|
|
|
max-size: 50M
|
|
|
|
|
2022-06-29 00:24:53 +02:00
|
|
|
- name: 📜 Restore CMakeCache
|
2024-01-30 21:19:25 +01:00
|
|
|
uses: actions/cache@v4
|
2022-06-29 00:24:53 +02:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
build/CMakeCache.txt
|
2023-10-04 22:23:41 +02:00
|
|
|
key: ${{ runner.os }}-analysis-build-${{ hashFiles('**/CMakeLists.txt') }}
|
2023-01-30 10:42:07 +01:00
|
|
|
|
2021-09-11 18:58:53 +02:00
|
|
|
- name: ⬇️ Install dependencies
|
2021-08-29 14:30:40 +02:00
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo bash dist/get_deps_debian.sh
|
2021-09-11 18:15:27 +02:00
|
|
|
|
2021-09-11 18:58:53 +02:00
|
|
|
- name: 🛠️ Build
|
2021-08-29 14:30:40 +02:00
|
|
|
run: |
|
2023-11-25 15:42:51 +01:00
|
|
|
set -x
|
2021-10-09 23:15:08 +02:00
|
|
|
mkdir -p build
|
2021-08-29 14:30:40 +02:00
|
|
|
cd build
|
2022-06-25 12:19:59 +02:00
|
|
|
CC=gcc-12 CXX=g++-12 cmake \
|
2022-01-13 21:31:01 +01:00
|
|
|
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
2021-08-29 14:30:40 +02:00
|
|
|
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
|
2022-01-13 21:31:01 +01:00
|
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
|
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
|
|
|
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
|
|
|
|
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
|
2022-07-18 20:18:41 +02:00
|
|
|
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
2021-08-29 14:30:40 +02:00
|
|
|
..
|
|
|
|
make -j 4 install
|
2021-08-29 14:26:50 +02:00
|
|
|
|
2021-09-11 18:58:53 +02:00
|
|
|
- name: 🗯️ Perform CodeQL Analysis
|
2022-06-23 23:48:02 +02:00
|
|
|
uses: github/codeql-action/analyze@v2
|