Skip to content

CodeQL

CodeQL #1046

name: "CodeQL"
on:
push:
branches: [master, v2019]
paths-ignore:
- 'docs/**'
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
paths-ignore:
- 'docs/**'
schedule:
- cron: '0 23 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['cpp']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
- run: |
sudo apt update
sudo apt install -y build-essential autoconf automake bison expect libmysqlclient-dev libpcre3-dev libpq-dev libsqlite3-dev libssl-dev libtool libz-dev telnet libgtest-dev libjemalloc-dev
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DPACKAGE_DB_SQLITE=2 .. && make -j 2 install && cd ..
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2