CodeQL #8
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
# For most projects, this workflow file will not need changing; you simply need | |
# to commit it to your repository. | |
# | |
# You may wish to alter this file to override the set of languages analyzed, | |
# or to provide custom queries or build logic. | |
# | |
# ******** NOTE ******** | |
# We have attempted to detect the languages in your repository. Please check | |
# the `language` matrix defined below to confirm you have the correct set of | |
# supported CodeQL languages. | |
# | |
name: "CodeQL" | |
on: | |
push: | |
branches: [ "dev" ] | |
pull_request: | |
branches: [ "dev" ] | |
schedule: | |
- cron: '16 18 * * 1' | |
jobs: | |
analyze: | |
name: Analyze (${{ matrix.language }}) | |
# Runner size impacts CodeQL analysis time. To learn more, please see: | |
# - https://gh.io/recommended-hardware-resources-for-running-codeql | |
# - https://gh.io/supported-runners-and-hardware-resources | |
# - https://gh.io/using-larger-runners (github.com only) | |
# Consider using larger runners or machines with greater resources for possible analysis time improvements. | |
runs-on: ubuntu-24.04 | |
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} | |
permissions: | |
# required for all workflows | |
security-events: write | |
# required to fetch internal or private CodeQL packs | |
packages: read | |
# only required for workflows in private repositories | |
actions: read | |
contents: read | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- language: c-cpp | |
build-mode: manual | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: Install Packages | |
run: | | |
pip install --user meson | |
sudo apt-get -y install ninja-build \ | |
libdrm-dev libinput-dev libsystemd-dev libxkbcommon-dev | |
meson --version | |
gcc --version | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
build-mode: ${{ matrix.build-mode }} | |
- if: matrix.build-mode == 'manual' | |
shell: bash | |
run: | | |
cd ${{github.workspace}} | |
meson setup buildDir --default-library static | |
ninja -C ${{github.workspace}}/buildDir | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:${{matrix.language}}" |