build: Add memory leak detection in "Build Analyze Check" GitHub Action

issue: 3350
This commit is contained in:
Dan Dwyer
2025-08-24 20:15:24 -07:00
committed by Christian W. Zuckschwerdt
parent 463776f0e1
commit 0daaa39bff
3 changed files with 58 additions and 13 deletions

View File

@@ -1,3 +1,5 @@
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax
# https://docs.github.com/en/actions/reference/runners/github-hosted-runners
name: Build Analyze Check
on: [push, pull_request]
jobs:
@@ -16,25 +18,47 @@ jobs:
run: cmake -B build
- name: Build
run: cmake --build build
- name: Test
run: |
cmake --build build --target test || \
{ cat build/Testing/Temporary/LastTest.log && false; }
build_check_job:
runs-on: ubuntu-latest
name: Build with CMake
strategy:
fail-fast: false
matrix:
cmake-generator: [Unix Makefiles, Ninja]
cmake-build-type: [Debug, Release]
name: Build ${{ matrix.cmake-build-type }} ${{ matrix.cmake-generator }}
steps:
- uses: actions/checkout@v5
- name: Setup
- name: Apt Update
run: sudo apt-get update -q -y --no-install-recommends
- name: Install Build Tools
run: sudo apt-get install -q -y --no-install-recommends cmake ninja-build
- name: Install Libraries
run: sudo apt-get install -q -y --no-install-recommends libsoapysdr-dev librtlsdr-dev
- name: Versions
run: |
sudo apt-get update -q -y
sudo apt-get install -q -y --no-install-recommends cmake ninja-build
sudo apt-get install -q -y libsoapysdr-dev librtlsdr-dev
- name: Configure CMake+Ninja
run: cmake -GNinja -B ${{ runner.workspace }}/b/ninja -DENABLE_RTLSDR=OFF -DENABLE_SOAPYSDR=OFF
- name: Build CMake+Ninja
run: cmake --build ${{ runner.workspace }}/b/ninja
- name: Configure CMake+UnixMakefiles
run: cmake -G"Unix Makefiles" -B ${{ runner.workspace }}/b/unixmakefiles -DENABLE_RTLSDR=OFF -DENABLE_SOAPYSDR=OFF
- name: Build CMake+UnixMakefiles
run: cmake --build ${{ runner.workspace }}/b/unixmakefiles
cmake --version
lsb_release -a
make --version
echo Ninja Version: $(ninja --version)
uname -a
- name: Configure
run: |
cmake \
-B build \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }} \
-DENABLE_RTLSDR=OFF -DENABLE_SOAPYSDR=OFF \
-G "${{ matrix.cmake-generator }}"
- name: Build
run: cmake --build build
- name: Test
run: |
cmake --build build --target test || \
{ cat build/Testing/Temporary/LastTest.log && false; }
doc_check_job:
runs-on: ubuntu-latest

3
.gitignore vendored
View File

@@ -35,3 +35,6 @@ cmake-build-debug/
# File manager files
.DS_Store
.history
# Precompiled headers
*.h.pch

View File

@@ -33,6 +33,24 @@ endforeach(testSrc)
# Define integration tests
########################################################################
add_test(rtl_433_help ../src/rtl_433 -h)
add_test(flex_decoder_help ../src/rtl_433 -X)
add_test(flex_decoder bash -c
"touch empty_file.cu8 && \
../src/rtl_433 \
-X n=name,m=FSK_PCM,s=10,l=10,r=10240 \
-r empty_file.cu8")
# Borrowed from: https://github.com/merbanan/rtl_433/pull/786#issuecomment-410513334
add_test(flex_decoder_w_getter bash -c
"touch empty_file.cu8 && \
../src/rtl_433 \
-X 'n=name,m=FSK_PCM,s=10,l=10,r=10240,get=@20:{12}0x7f:status:[10:pir 14:open 7:close 11:tamper 0xf:battery_low]' \
-r empty_file.cu8")
# Borrowed from: https://github.com/merbanan/rtl_433/pull/1532#issue-728103584
add_test(flex_decoder_w_getter_and_format_specifier bash -c
"touch empty_file.cu8 && \
../src/rtl_433 \
-X 'n=name,m=FSK_PCM,s=10,l=10,r=10240,get=@2:{32}:code:%x' \
-r empty_file.cu8")
# Black-box test of the HTTP/WS API server. Starts rtl_433 in manual device
# mode (no SDR), exercises each endpoint, and shuts it down cleanly. Skipped