-
-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (52 loc) · 1.47 KB
/
scan-build.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
name: "Scan Build"
on:
push:
branches: [master]
paths:
- 'include/**.hpp'
- 'test/**.cpp'
- '**.cmake'
- '.gitmodules'
- 'CMakeLists.txt'
- 'test/CMakeLists.txt'
- '.github/workflows/scan-build.yml'
pull_request:
branches: [master]
paths:
- 'include/**.hpp'
- 'test/**.cpp'
- '**.cmake'
- '.gitmodules'
- 'CMakeLists.txt'
- 'test/CMakeLists.txt'
- '.github/workflows/scan-build.yml'
jobs:
scan:
runs-on: ubuntu-20.04
env:
build-directory: build
artifact-directory: scan-result
steps:
- name: Clone
uses: actions/checkout@v2
with:
submodules: true
- name: Prepare Environment
run: |
sudo apt-get update
sudo apt-get install -y clang clang-tools g++-multilib
cmake -E make_directory ${{env.build-directory}}
- name: Configure
working-directory: ${{env.build-directory}}
run: |
scan-build -o ../${{env.artifact-directory}} cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DDELEGATE_COMPILE_UNIT_TESTS=On
- name: Scan
working-directory: ${{env.build-directory}}
run: |
scan-build -o ../${{env.artifact-directory}} cmake --build .
- uses: actions/upload-artifact@v2
with:
name: Scan Results
path: ${{env.artifact-directory}}/