Skip to content

Enhance runtime errors #358

Enhance runtime errors

Enhance runtime errors #358

Workflow file for this run

name: "CodeQL"
on:
push:
branches: [ "dev", "master" ]
pull_request:
branches: [ "dev", "master" ]
schedule:
- cron: '34 12 * * 4'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 15
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
- language: python
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
# 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 you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Update LLVM compilers
if: matrix.build-mode == 'manual'
shell: bash
run: |
compiler_version=16
sudo apt-get install -y clang-${compiler_version} lld-${compiler_version} \
libc++-${compiler_version}-dev libc++abi-${compiler_version}-dev \
clang-tools-${compiler_version} llvm-${compiler_version}
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
cmake -Bbuild \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang-16 \
-DCMAKE_CXX_COMPILER=clang++-16 \
-DARK_SANITIZERS=On \
-DARK_BUILD_EXE=On \
-DARK_BUILD_MODULES=Off \
-DARK_TESTS=On
cmake --build build --config Release -j $(nproc)
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"