| 1 |
name: "CodeQL" |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [ master ] |
| 6 |
pull_request: |
| 7 |
|
| 8 |
branches: [ master ] |
| 9 |
schedule: |
| 10 |
- cron: '18 10 * * 3' |
| 11 |
|
| 12 |
jobs: |
| 13 |
analyze: |
| 14 |
name: Analyze |
| 15 |
runs-on: ubuntu-latest |
| 16 |
permissions: |
| 17 |
actions: read |
| 18 |
contents: read |
| 19 |
security-events: write |
| 20 |
|
| 21 |
strategy: |
| 22 |
fail-fast: false |
| 23 |
matrix: |
| 24 |
language: [ 'cpp' ] |
| 25 |
|
| 26 |
steps: |
| 27 |
- name: Checkout repository |
| 28 |
uses: actions/checkout@v4 |
| 29 |
|
| 30 |
- name: Initialize CodeQL |
| 31 |
uses: github/codeql-action/init@v3 |
| 32 |
with: |
| 33 |
languages: ${{ matrix.language }} |
| 34 |
|
| 35 |
- name: Install Prerequisites |
| 36 |
shell: bash |
| 37 |
run: sudo apt install -y ninja-build libpopt-dev |
| 38 |
|
| 39 |
- name: Build |
| 40 |
shell: bash |
| 41 |
run: | |
| 42 |
mkdir $PWD/build |
| 43 |
cmake -S . -B build -GNinja \ |
| 44 |
-DCMAKE_BUILD_TYPE=Release \ |
| 45 |
-DBUILD_EXAMPLES=ON \ |
| 46 |
-DBUILD_TOOLS=ON |
| 47 |
cmake --build build |
| 48 |
|
| 49 |
- name: Perform CodeQL Analysis |
| 50 |
uses: github/codeql-action/analyze@v3 |