File: codeql.yml

package info (click to toggle)
bpftrace 0.24.1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,496 kB
  • sloc: cpp: 60,982; ansic: 10,952; python: 953; yacc: 665; sh: 536; lex: 295; makefile: 22
file content (68 lines) | stat: -rw-r--r-- 1,727 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: "CodeQL"

on:
  push:
    branches: [ master, release/* ]
  pull_request:
  schedule:
    - cron: "19 22 * * 1"

# Cancel previous run if a new one is started
concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest
    permissions:
      actions: read
      contents: read
      security-events: write
      # For flakehub cache
      id-token: write

    strategy:
      fail-fast: false
      matrix:
        language: [ python, cpp ]

    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          submodules: recursive

      - uses: DeterminateSystems/nix-installer-action@v17
        with:
          determinate: true
      - uses: DeterminateSystems/flakehub-cache-action@v2

      - name: Configure (cpp)
        if: ${{ matrix.language == 'cpp' }}
        run: |
          mkdir $GITHUB_WORKSPACE/build && cd $GITHUB_WORKSPACE/build
          nix develop --command cmake ..

      - name: Initialize CodeQL
        uses: github/codeql-action/init@v3
        with:
          config-file: ./.github/codeql/codeql-config.yml
          languages: ${{ matrix.language }}
          queries: +security-and-quality

      - name: Autobuild
        uses: github/codeql-action/autobuild@v3
        if: ${{ matrix.language == 'python' }}

      - name: Build cpp
        if: ${{ matrix.language == 'cpp' }}
        run: |
          cd $GITHUB_WORKSPACE/build
          nix develop --command make -j$(nproc)

      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@v3
        with:
          category: "/language:${{ matrix.language }}"