-
Notifications
You must be signed in to change notification settings - Fork 30
65 lines (54 loc) · 1.71 KB
/
ci.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
name: "CI"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '35 20 * * 5'
jobs:
analyze:
name: Build-Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Install dependencies and build
run: |
sudo apt-get update
sudo apt-get -y --no-install-recommends install build-essential cmake libfftw3-dev libusb-1.0-0-dev librtlsdr-dev libcurl4-gnutls-dev cppcheck
make
- name: Perform CodeQL Analysis (SAST)
uses: github/codeql-action/analyze@v1
- name: Cppcheck (C/C++ format & best best-practice)
run: |
echo "===== CPPCHECK ====="
cppcheck --std=c11 *.c wsprd/*.c
- name: Cpplint check (formatting & best-practice check)
run: |
pip install cpplint
echo "===== CPPLINT ====="
cpplint --linelength=1000 --extensions=c --headers=h --recursive * || true
- name: Codespell check (because of my spelling...)
run: |
pip install codespell
echo "===== CODESPELL ====="
codespell -L 'rcall' *.md *.c *.h wsprd/*.c wsprd/*.h .github/workflows/ci.yml
- name: Unit-Test
run: |
echo "===== Decoder self-test ====="
./rtlsdr_wsprd -f 2m -c A1XYZ -l AB12CD -r ./signals/refSignalSnr0dB.iq
./rtlsdr_wsprd -f 2m -c A1XYZ -l AB12CD -t