CodeQL #240
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: | |
# GitHub wants this to happen on a push to main... | |
push: | |
branches: [main] | |
pull_request: | |
schedule: | |
- cron: "00 00 * * 1" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-latest | |
container: ghcr.io/jannik2099/pms-utils-gentoo-ci:latest | |
permissions: | |
# required for all workflows | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: ["c-cpp"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: fixup git permissions | |
run: git config --global --add safe.directory $(realpath .) | |
- name: configure | |
run: | | |
. /etc/profile | |
CC=clang CXX=clang++ meson setup -Dtest=true build | |
- name: Initialize CodeQL | |
id: init_codeql | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
- name: fixup LD_PRELOAD | |
run: | | |
echo "LD_PRELOAD=/__t/CodeQL/${{ steps.init_codeql.outputs.codeql-version }}/x64/codeql/tools/linux64/lib64trace.so" >> ${GITHUB_ENV} | |
- name: compile | |
if: ${{ matrix.language == 'c-cpp' }} | |
run: | | |
. /etc/profile | |
ninja -C build | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:${{matrix.language}}" |