| 1 | name: "CodeQL" |
| 2 | on: |
| 3 | push: |
| 4 | branches: ["master"] |
| 5 | pull_request: |
| 6 | branches: ["master"] |
| 7 | schedule: |
| 8 | - cron: "18 19 * * 1" |
| 9 | jobs: |
| 10 | analyze-c: |
| 11 | name: Analyze C |
| 12 | runs-on: "ubuntu-latest" |
| 13 | timeout-minutes: 360 |
| 14 | permissions: |
| 15 | security-events: write |
| 16 | actions: read |
| 17 | contents: read |
| 18 | strategy: |
| 19 | fail-fast: true |
| 20 | matrix: |
| 21 | buildtype: ["debug", "release"] |
| 22 | steps: |
| 23 | - name: Checkout repository |
| 24 | uses: actions/checkout@v6 |
| 25 | - name: Install dependencies |
| 26 | run: | |
| 27 | sudo apt-get update |
| 28 | sudo apt-get install -y libgumbo-dev libfuse3-dev libssl-dev \ |
| 29 | libcurl4-openssl-dev uuid-dev help2man libexpat1-dev pkg-config \ |
| 30 | meson ninja-build |
| 31 | - name: Initialize CodeQL |
| 32 | uses: github/codeql-action/init@v4 |
| 33 | with: |
| 34 | languages: c |
| 35 | - name: Setup Meson |
| 36 | run: meson setup builddir -Dbuildtype=${{ matrix.buildtype }} |
| 37 | - name: Compile |
| 38 | run: meson compile -C builddir |
| 39 | - name: Perform CodeQL Analysis |
| 40 | uses: github/codeql-action/analyze@v4 |
| 41 | with: |
| 42 | category: "/language:c/buildtype:${{matrix.buildtype}}" |
| 43 | analyze-actions: |
| 44 | name: Analyze Actions |
| 45 | runs-on: "ubuntu-latest" |
| 46 | timeout-minutes: 360 |
| 47 | permissions: |
| 48 | security-events: write |
| 49 | actions: read |
| 50 | contents: read |
| 51 | steps: |
| 52 | - name: Checkout repository |
| 53 | uses: actions/checkout@v6 |
| 54 | - name: Initialize CodeQL |
| 55 | uses: github/codeql-action/init@v4 |
| 56 | with: |
| 57 | languages: actions |
| 58 | - name: Perform CodeQL Analysis |
| 59 | uses: github/codeql-action/analyze@v4 |
| 60 | with: |
| 61 | category: "/language:actions" |