CodeQL #319
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: [ "master" ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ "master" ] | |
schedule: | |
- cron: '18 19 * * 2' | |
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' ] | |
autobuild_force_build_system: ['cmake', 'make', 'meson'] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Maybe remove non-CMake build systems | |
if: matrix.autobuild_force_build_system == 'cmake' | |
run: | | |
rm -vrf Makefile* meson.build | |
- name: Maybe remove non-Make build systems | |
if: matrix.autobuild_force_build_system == 'make' | |
run: | | |
rm -vrf CMakeLists.txt cmake/ meson.build | |
- name: Maybe remove non-Meson build systems | |
if: matrix.autobuild_force_build_system == 'meson' | |
run: | | |
rm -vrf Makefile* CMakeLists.txt cmake/ | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v3 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:${{matrix.language}}" |