forked from WasmEdge/WasmEdge
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (58 loc) · 1.65 KB
/
static-code-analysis.yml
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
name: Static Code Analysis
concurrency:
group: static-code-analysis-${{ github.head_ref }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'info'
push:
branches:
- master
paths-ignore:
- '.github/workflows/rust*.yml'
- 'docs/**'
- 'bindings/**'
- 'rpm/**'
- '**/*.md'
pull_request:
branches:
- master
- 'proposal/**'
paths-ignore:
- '.github/workflows/rust*.yml'
- 'docs/**'
- 'bindings/**'
- 'rpm/**'
- '**/*.md'
jobs:
static_analysis:
name: Run Static Code Analysis using Infer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
lsb_release -a
sudo apt update
sudo apt upgrade -y
sudo apt install -y software-properties-common libboost-all-dev llvm-11-dev liblld-11-dev liblld-11 clang-11 tar
curl -sSL "https://github.com/facebook/infer/releases/download/v1.1.0/infer-linux64-v1.1.0.tar.xz" | sudo tar -C /opt -xJ && sudo ln -s "/opt/infer-linux64-v1.1.0/bin/infer" /usr/local/bin/infer
- name: Generate compilation database
run: |
mkdir build
cd build
infer compile -- cmake -DCMAKE_BUILD_TYPE=Debug -DLLVM_DIR=/usr/lib/llvm-11/lib/cmake/llvm ..
- name: Run Infer Static Code Analysis
run: |
cd build
infer run --keep-going -- make -j 4
- uses: actions/upload-artifact@v2
with:
name: report
path: |
build/infer-out/report.txt
build/infer-out/report.json