mirror of
https://github.com/ashaduri/gsmartcontrol.git
synced 2026-11-24 14:56:40 +00:00
- Use the full category of the previous CodeQL configuration (.github/workflows/codeql-analysis.yml:analyze/language:cpp), so the existing analysis keeps receiving results and its alerts get closed. - warnings_report.py: rename the Warning tuple to CompilerWarning (it shadowed the built-in), add docstrings for the __init__ methods and start the module docstring on its first line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
name: "CodeQL"
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
schedule:
|
|
- cron: '24 10 * * 6'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
analyze:
|
|
name: Analyze (cpp)
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 45
|
|
permissions:
|
|
contents: read
|
|
security-events: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install libgtkmm-3.0-dev gettext
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@v4
|
|
with:
|
|
languages: c-cpp
|
|
build-mode: manual
|
|
|
|
# Build the same configuration as the tier 1 Linux CI, including tests and examples.
|
|
- name: Build
|
|
env:
|
|
CC: gcc-14
|
|
CXX: g++-14
|
|
run: |
|
|
cmake -B build -S "$GITHUB_WORKSPACE" \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
-DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/toolchains/linux-dev.cmake"
|
|
cmake --build build
|
|
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@v4
|
|
with:
|
|
# Keep the category of the previous (autobuild) configuration, so that existing alerts carry over.
|
|
category: ".github/workflows/codeql-analysis.yml:analyze/language:cpp"
|