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 * * *'
|
2021-08-29 14:26:50 +02:00
|
|
|
|
|
|
|
jobs:
|
2021-10-09 23:30:35 +02:00
|
|
|
codeql:
|
|
|
|
name: 🐛 CodeQL
|
2021-08-29 14:26:50 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
actions: read
|
|
|
|
contents: read
|
|
|
|
security-events: write
|
|
|
|
|
|
|
|
steps:
|
2021-09-11 18:58:53 +02:00
|
|
|
- name: 🧰 Checkout
|
2021-08-29 14:26:50 +02:00
|
|
|
uses: actions/checkout@v2
|
2021-08-29 14:40:10 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
submodules: recursive
|
2021-08-29 14:26:50 +02:00
|
|
|
|
2021-09-11 18:58:53 +02:00
|
|
|
- name: ✋ Initialize CodeQL
|
2021-08-29 14:26:50 +02:00
|
|
|
uses: github/codeql-action/init@v1
|
|
|
|
with:
|
2021-09-11 19:37:20 +02:00
|
|
|
languages: 'cpp'
|
2021-08-29 14:26:50 +02:00
|
|
|
|
2021-09-19 21:49:09 +02:00
|
|
|
- name: 📜 Restore cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.ccache
|
2021-12-15 23:57:00 +01:00
|
|
|
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
|
|
|
|
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-
|
2021-09-19 21:49:09 +02: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: |
|
2021-10-09 23:15:08 +02:00
|
|
|
mkdir -p build
|
2021-08-29 14:30:40 +02:00
|
|
|
cd build
|
|
|
|
CC=gcc-10 CXX=g++-10 cmake \
|
|
|
|
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
|
|
|
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
|
2021-10-09 23:15:08 +02:00
|
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
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
|
|
|
|
uses: github/codeql-action/analyze@v1
|