CodeQL #180
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CodeQL" | |
on: | |
push: | |
branches: [ 'master' ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ 'master' ] | |
schedule: | |
- cron: '51 12 * * 0' | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'cpp' ] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y bison check cmake debhelper flex groff libbsd-dev libcurl4-openssl-dev libmaxminddb-dev libgtk-3-dev libgtk2.0-dev libidn11-dev libltdl-dev libluajit-5.1-dev libncurses5-dev libnet1-dev libpcap-dev libpcre3-dev librtmp-dev libssl-dev | |
- run: | | |
git clone https://github.com/richq/cmake-lint.git | |
cd cmake-lint | |
python setup.py install --user | |
cd - | |
./misc/cmakelint.sh | |
mkdir build | |
cd build | |
cmake -DENABLE_TESTS=Off $BUILD_ARGS .. | |
make | |
env: | |
CC: 'gcc' | |
BUILD_ARGS: '' | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
with: | |
category: "/language:${{matrix.language}}" |