rtlsdr-wsprd/.github/workflows/ci.yml

66 wiersze
1.7 KiB
YAML
Czysty Zwykły widok Historia

2021-12-04 20:53:32 +00:00
name: "CI"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '35 20 * * 5'
jobs:
analyze:
2021-12-04 20:53:32 +00:00
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 }}
2021-12-04 05:22:05 +00:00
- 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
2021-12-04 05:22:05 +00:00
make
- name: Perform CodeQL Analysis (SAST)
uses: github/codeql-action/analyze@v1
- name: Cppcheck (C/C++ format & best best-practice)
2021-12-04 19:45:40 +00:00
run: |
2021-12-04 20:53:32 +00:00
echo "===== CPPCHECK ====="
2021-12-04 19:45:40 +00:00
cppcheck --std=c11 *.c wsprd/*.c
2021-12-04 20:53:32 +00:00
- name: Cpplint check (formatting & best-practice check)
run: |
pip install cpplint
echo "===== CPPLINT ====="
cpplint --linelength=1000 --extensions=c --headers=h --recursive * || true
2021-12-19 18:44:32 +00:00
- name: Codespell check (because of my spelling...)
run: |
pip install codespell
echo "===== CODESPELL ====="
2021-12-19 18:58:51 +00:00
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