| name: "CodeQL" | |
| on: | |
| push: | |
| pull_request: | |
| concurrency: | |
| group: >- | |
| ${{ github.workflow }}-${{ github.head_ref || | |
| (github.event_name == 'push' && github.ref) || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| analyze: | |
| name: Analyze | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [ 'cpp', 'python' ] | |
| steps: | |
| - name: Set make jobs | |
| run: | | |
| echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v4 | |
| with: | |
| config-file: .github/codeql-${{ matrix.language }}.yml | |
| languages: ${{ matrix.language }} | |
| - name: Autobuild | |
| uses: github/codeql-action/autobuild@v4 | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v4 | |
| with: | |
| category: "/language:${{matrix.language}}" |