Merge pull request #154 from Guenael/make-opts #178
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CI & CodeQL" | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
jobs: | |
analyze: | |
name: "Analyze-Build-Test" | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
packages: read | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- language: c-cpp | |
build-mode: manual | |
steps: | |
- name: "Checkout repository" | |
uses: actions/checkout@v4 | |
- name: "CodeQL Init" | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
build-mode: ${{ matrix.build-mode }} | |
- 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 | |
pip install cpplint codespell | |
make | |
- name: "CodeQL Analysis" | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:${{matrix.language}}" | |
- name: "Cppcheck (C/C++ format & best best-practice)" | |
run: | | |
cppcheck --std=c11 *.c wsprd/*.c | |
- name: "Cpplint check (formatting & best-practice check)" | |
run: | | |
cpplint --linelength=1000 --extensions=c --headers=h --recursive * || true | |
- name: "Codespell check" | |
run: | | |
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 |