Skip to content

CodeQL

CodeQL #108

Workflow file for this run

name: "CodeQL"
on:
push:
branches: [ "develop", "main" ]
pull_request:
branches: [ "develop", "main" ]
schedule:
- cron: '31 12 * * 6'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
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
- name: Install dependencies
run: |
sudo apt install xvfb libgl1-mesa-dev -y
chmod +x install_dependencies.sh
sudo ./install_dependencies.sh
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# Build xilens manually
- if: matrix.build-mode == 'manual'
shell: bash
run: |
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
xvfb-run -a --server-args="-screen 0 1024x768x24" make all -j
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"