Skip to content

ci: add Valgrind memory leak test to CI workflow #53

ci: add Valgrind memory leak test to CI workflow

ci: add Valgrind memory leak test to CI workflow #53

Workflow file for this run

name: Native Build
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
natvie-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build_type: [Release]
compiler: [gcc]
include:
- compiler: gcc
cpp_compiler: g++
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y cmake build-essential libfftw3-dev libcurl4-openssl-dev ffmpeg cpplint valgrind
- name: Check cpplint
run: cpplint --recursive lib include
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Build
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build_type }}
- name: Install Executable file
run: sudo make install -C build
- name: Test CLI
run: cd tests && ./test.sh 5
- name: Valgrind Memory Leak Test
run: valgrind --leak-check=full --error-exitcode=1 ./build/cli/vibra -R -f ./tests/sample.mp3