CodeQL #120
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: '45 0 * * 1' | |
jobs: | |
analyze: | |
name: 'Analyze' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04] | |
compiler_c: [gcc] | |
compiler_cxx: [g++] | |
language: [ 'cpp' ] | |
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] | |
# Learn more: | |
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed | |
steps: | |
- name: 'Checkout repository' | |
uses: actions/checkout@v4.1.1 | |
# Initializes the CodeQL tools for scanning. | |
- name: 'Initialize CodeQL' | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
- name: 'Install build dependencies' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y texinfo | |
sudo apt-get install -y autotools-dev autoconf build-essential bear | |
# Use custom build process for C/C++ | |
- name: 'Build' | |
env: | |
CC: ${{ matrix.compiler_c }} | |
CXX: ${{ matrix.compiler_cxx }} | |
run: | | |
cd ${{ github.workspace }} | |
autoreconf -vi | |
./scripts/build.sh | |
- name: 'Perform CodeQL analysis' | |
uses: github/codeql-action/analyze@v2 |