-
Notifications
You must be signed in to change notification settings - Fork 37
47 lines (40 loc) · 1.28 KB
/
Copy pathstatic-analysis.yml
File metadata and controls
47 lines (40 loc) · 1.28 KB
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
name: Static analysis
on: [push, pull_request]
jobs:
analyze-static:
name: Analyze Static Code
runs-on: ubuntu-latest
container:
image: ghcr.io/azure/azure-osconfig/ubuntu-22.04-amd64@sha256:0eed71cef37604c37186ec035974168a40a84d27e26d3b746a2858d99f305e2e
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
clean: true
- name: Prepare compile command database
run: |
mkdir -p build
cd build
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug ../src
- name: "Temporary: install clang-tools"
run: |
apt-get update
apt-get install -y clang-tools
- name: Run clang static analyzer
run: |
mkdir -p output
analyze-build-14 --verbose \
--status-bugs \
--exclude src/adapters/pnp/azure-iot-sdk-c \
--exclude src/adapters/pnp/PnpUtils.c \
--exclude src/adapters/pnp/AisUtils.c \
--exclude src/common/parson \
--exclude src/modules/commandrunner/src/lib \
--cdb build/compile_commands.json \
--output output/scan-build
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: scan-build
path: |
output/scan-build