Skip to content

Commit

Permalink
Add CodeQL workflow
Browse files Browse the repository at this point in the history
Automated code scanning for security risks on a monthly schedule (or triggered manually)
  • Loading branch information
svetter authored Dec 20, 2023
1 parent a5d31b7 commit 070bed4
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CodeQL

on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'

jobs:
analyze:
name: Analyze
runs-on: 'ubuntu-latest'
timeout-minutes: 30
permissions:
actions: read
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: "c-cpp"

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: "6.6"
modules: "qtcharts"
cache: true

- name: Run QMake
run: |
mkdir build
cd build
qmake ../PAL.pro "DISTRIBUTION=$DISTRIBUTION"
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores

- name: Compile
run: |
cd build
make -j${{ steps.cpu-cores.outputs.count }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:c-cpp"

0 comments on commit 070bed4

Please sign in to comment.