xref: /freebsd/sys/contrib/openzfs/.github/workflows/codeql.yml (revision 87b759f0fa1f7554d50ce640c40138512bbded44)
1name: "CodeQL"
2
3on:
4  push:
5  pull_request:
6
7concurrency:
8  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9  cancel-in-progress: true
10
11jobs:
12  analyze:
13    name: Analyze
14    runs-on: ubuntu-latest
15    permissions:
16      actions: read
17      contents: read
18      security-events: write
19
20    strategy:
21      fail-fast: false
22      matrix:
23        language: [ 'cpp', 'python' ]
24
25    steps:
26    - name: Set make jobs
27      run: |
28        echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
29
30    - name: Checkout repository
31      uses: actions/checkout@v4
32
33    - name: Initialize CodeQL
34      uses: github/codeql-action/init@v3
35      with:
36        config-file: .github/codeql-${{ matrix.language }}.yml
37        languages: ${{ matrix.language }}
38
39    - name: Autobuild
40      uses: github/codeql-action/autobuild@v3
41
42    - name: Perform CodeQL Analysis
43      uses: github/codeql-action/analyze@v3
44      with:
45        category: "/language:${{matrix.language}}"
46