-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (70 loc) · 1.89 KB
/
static-analysis.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: "Static Analysis"
on: [push]
jobs:
codeql:
name: Analyze with CodeQL
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ['cpp']
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: apt-get install packages
run: sudo apt-get update -qq &&
sudo apt-get install --no-install-recommends -y
make
pkg-config
libsdl2-dev
libyaml-dev
libsdl2-image-dev
libwebsockets-dev
- name: install libcyaml
run: |
git clone https://github.com/tlsa/libcyaml.git &&
sudo make -C libcyaml install
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- run: |
make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
scan-build:
name: Analyze with scan-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ['cpp']
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: apt-get install packages
run: sudo apt-get update -qq &&
sudo apt-get install --no-install-recommends -y
make
pkg-config
clang-tools
libsdl2-dev
libyaml-dev
libsdl2-image-dev
libwebsockets-dev
- name: install libcyaml
run: |
git clone https://github.com/tlsa/libcyaml.git &&
sudo make -C libcyaml install
- name: scan-build
run: |
make clean
scan-build -sarif -o build/sarif make
- name: upload scan-build
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: build/sarif