Skip to content

Commit

Permalink
Add CodeQL workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pwntester authored and mrts committed Nov 9, 2022
1 parent 5b66d84 commit 27060e5
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "CodeQL"

on:
push:
branches: [ 'main' ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ 'main' ]
schedule:
- cron: '49 20 * * 4'

env:
BUILD_TYPE: RelWithDebInfo

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
container: mrts/qt-cmake-gtest-valgrind-ubuntu:v1.8
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]

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

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

- name: Create build directory
run: mkdir build

- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..

- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE

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

0 comments on commit 27060e5

Please sign in to comment.