Skip to content

CodeQL

CodeQL #123

name: CodeQL
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 6 * * 1' # Weekly on Monday at 6 AM UTC
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze (c-cpp)
runs-on: ubuntu-24.04
permissions:
security-events: write
packages: read
actions: read
contents: read
env:
# Disable TRAP cache to avoid "No such file or directory" error
# in pre-finalize.sh when tarballs directory doesn't exist
CODEQL_EXTRACTOR_CPP_TRAP_CACHING: false
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: 'true'
- name: Install dependencies
run: |
sudo apt-get update -q=2
sudo apt-get install -q=2 libsdl2-dev libsdl2-mixer-dev
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: c-cpp
build-mode: manual
- name: Build
run: |
make defconfig
make -j$(nproc)
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:c-cpp"