CodeQL #77
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
name: "CodeQL" | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
schedule: | |
- cron: '32 7 * * 5' | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | |
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: ['c-cpp'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Catch2 v3 from source | |
run: | | |
git clone https://github.com/catchorg/Catch2.git | |
cd Catch2 | |
git checkout v3.5.2 | |
cmake -Bbuild -S. -DBUILD_TESTING=OFF | |
sudo cmake --build build/ --target install | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
- run: | | |
cmake --preset gh-coverage | |
cmake --build ${{github.workspace}}/build/debug/gh-coverage | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:${{matrix.language}}" |