Skip to content

Commit

Permalink
chore: try codeql workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mhx committed Aug 31, 2024
1 parent 7afd0af commit cd7b39c
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "CodeQL"

on:
push:
branches: [ "main", "mhx/work" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '34 3 * * 0'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
security-events: write
packages: read
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
build-mode: manual
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- if: matrix.build-mode == 'manual'
shell: bash
run: |
cmake --fresh -B${{ runner.temp }}/build -S${{ runner.workspace }}/dwarfs/dwarfs -GNinja -DCMAKE_BUILD_TYPE=Debug -DWITH_TESTS=ON -DWITH_PXATTR=ON -DBUILD_SHARED_LIBS=ON
cmake --build ${{ runner.temp }}/build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

0 comments on commit cd7b39c

Please sign in to comment.