forked from merbanan/rtl_433
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (73 loc) · 2.71 KB
/
check.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
67
68
69
70
71
72
73
name: Build Analyze Check
on: [push, pull_request]
jobs:
build_check_job:
runs-on: ubuntu-latest
name: Build with CMake
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get latest CMake and Ninja
uses: lukka/get-cmake@latest
- name: Run CMake+Ninja
uses: lukka/run-cmake@v10
with:
configurePreset: dummy
configurePresetCmdString: "[`-B`, `${{ runner.workspace }}/b/ninja`, `-GNinja`, `-DENABLE_RTLSDR=OFF`, `-DENABLE_SOAPYSDR=OFF`]"
buildPreset: dummy
buildPresetCmdString: "[`--build`, `${{ runner.workspace }}/b/ninja`]"
- name: Run CMake+UnixMakefiles
uses: lukka/run-cmake@v10
with:
configurePreset: dummy
configurePresetCmdString: "[`-B`, `${{ runner.workspace }}/b/unixmakefiles`, `-G`, `Unix Makefiles`, `-DENABLE_RTLSDR=OFF`, `-DENABLE_SOAPYSDR=OFF`]"
buildPreset: dummy
buildPresetCmdString: "[`--build`, `${{ runner.workspace }}/b/unixmakefiles`]"
style_check_job:
runs-on: ubuntu-latest
name: Check code style
steps:
- uses: actions/checkout@v3
- name: Style Check
uses: ./.github/actions/style-check
maintainer_update_check_job:
runs-on: ubuntu-latest
name: Needs maintainer_update
steps:
- uses: actions/checkout@v3
- name: Working directory clean excluding untracked files
run: |
./maintainer_update.py
[ -z "$(git status --untracked-files=no --porcelain)" ]
symbolizer_check_job:
runs-on: ubuntu-latest
name: Check symbol errors
steps:
- uses: actions/checkout@v3
- name: Symbolizer report
run: |
./tests/symbolizer.py check
analyzer_check_job:
# https://github.com/actions/virtual-environments
# - Ubuntu 22.04 ubuntu-22.04
# - Ubuntu 20.04 ubuntu-20.04
# https://apt.llvm.org/
# - Jammy (22.04)
# - Focal (20.04)
# - Bionic (18.04)
runs-on: ubuntu-22.04
name: Analyze with Clang
steps:
- uses: actions/checkout@v3
- name: Install Clang
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main' -y
sudo apt-get update -q
sudo apt-get install -y clang-14 lld-14 libc++-14-dev libc++abi-14-dev clang-tools-14
- name: Clang Analyzer
# excludes include/mongoose.h src/mongoose.c include/jsmn.h src/jsmn.c
# exit code 1 if there is output
run: |
clang -Iinclude -DTHREADS --analyze -Xanalyzer -analyzer-output=text -Xanalyzer -analyzer-disable-checker=deadcode.DeadStores include/[a-ikln-z]*.h src/[a-ikln-z]*.c src/devices/*.c 2>&1 | tee analyzer.out
[ ! -s analyzer.out ]