Skip to content

CodeQL

CodeQL #557

name: "CodeQL"
on:
push:
branches: [dev, stable]
pull_request:
branches: [dev, stable]
schedule:
- cron: '0 16 * * 0'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
language: ['cpp']
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
- name: Checkout submodules
run: |
git submodule init
git submodule update
- uses: actions/setup-python@v4
with:
python-version: 3.10.x
- name: apt dependencies
run: |
sudo apt-get --assume-yes update
sudo apt-get --assume-yes install ninja-build libgraphviz-dev bison flex qtbase5-dev cmake
- name: py dependencies
run: |
pip install meson
- name: Prepare Rizin and Cutter
run: |
git clone --recursive --depth 1 https://github.com/rizinorg/rizin
cd rizin
meson build
ninja -C build
sudo ninja -C build install
cd ..
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Build with CodeQL
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_CUTTER_PLUGIN=OFF -DBUILD_SLEIGH_PLUGIN=ON ..
make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2