-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (47 loc) · 1.45 KB
/
static.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Static Analysis
on: [push, pull_request]
jobs:
CodeQL:
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Qt
run: |
sudo apt-mark hold grub-efi-amd64-signed
sudo apt update
sudo apt upgrade
sudo apt install qtbase5-dev qtconnectivity5-dev qttools5-dev qttools5-dev-tools
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: cpp
- name: Build
run: |
cmake -S "$GITHUB_WORKSPACE" -B "$RUNNER_TEMP"
cmake --build "$RUNNER_TEMP"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Cppcheck:
runs-on: ubuntu-latest
steps:
- name: Install Cppcheck
run: |
sudo apt-mark hold grub-efi-amd64-signed
sudo apt update
sudo apt upgrade
sudo apt install cppcheck
- uses: actions/checkout@v4
- name: Perform Cppcheck Analysis
run: ./.cppcheck.sh --xml --xml-version=2 2> "$RUNNER_TEMP/cppcheck.xml"
- name: Generate Report
if: ${{ failure() }}
run: |
cppcheck-htmlreport --title=Dokit --file="$RUNNER_TEMP/cppcheck.xml" \
--report-dir="$RUNNER_TEMP/report" --source-dir="$GITHUB_WORKSPACE"
- name: Upload Report
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: Cppcheck HTML Report
path: "${{ runner.temp }}/report"