Files
serge1-COFFI/.github/workflows/codeql-analysis.yml
T
Serge Lamikhov-Center fb01daada7 Add 'dot' requirement
2025-09-11 21:50:06 +00:00

73 lines
1.9 KiB
YAML

# 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: ["master"]
pull_request:
branches: ["master"]
schedule:
- cron: "25 2 * * 3"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["cpp", "python"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
if: matrix.language == 'python'
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install Python dependencies
if: matrix.language == 'python' && hashFiles('**/requirements.txt') != ''
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install C++ build dependencies
if: matrix.language == 'cpp'
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build g++ doxygen graphviz
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Build C++ project
if: matrix.language == 'cpp'
run: |
cmake -S . -B build -G Ninja -DCOFFI_BUILD_EXAMPLES=ON -DCOFFI_BUILD_TESTS=ON
cmake --build build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"