Skip to content

Updated valgrind test pipeline #2

Updated valgrind test pipeline

Updated valgrind test pipeline #2

Workflow file for this run

name: Valgrind Tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Dependencies
run: sudo apt-get install -y build-essential valgrind cmake
- name: Install slog
run: cmake . && make && sudo make install
- name: Compile Tests
run: gcc -o ./example/test_slog ./example/tests.c -lslog -g
- name: Compile Example
run: gcc -o ./example/slog_example ./example/example.c -lslog -g
- name: Run Valgrind Memory Check With Tests
run: valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=1 ./example/test_slog
- name: Run Valgrind Memory Check With Example
run: valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=1 ./example/slog_example