Skip to content

Commit 3dd617b

Browse files
committed
Add valgrind checks to all of the samples
1 parent 375650e commit 3dd617b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/samples.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,3 +266,25 @@ jobs:
266266
267267
exit $failed
268268
shell: bash
269+
- name: Run Valgrind on ${{ matrix.sample-executable.name }} (Linux)
270+
if: runner.os == 'Linux'
271+
working-directory: ./build
272+
run: |
273+
set -o pipefail
274+
set +e
275+
276+
echo "Running Valgrind on ${{ matrix.sample-executable.name }}"
277+
mkdir -p valgrind_logs
278+
valgrind \
279+
--leak-check=full \
280+
--error-exitcode=1 \
281+
--log-file=valgrind_logs/valgrind_${{ matrix.sample-executable.name }}.log \
282+
./${{ matrix.sample-executable.name }} "$KVS_STREAM_NAME" ${{ matrix.sample-executable.args }}
283+
valgrind_exit_code=$?
284+
285+
echo "========== Valgrind Output =========="
286+
cat valgrind_logs/${{ matrix.sample-executable.name }}.log
287+
echo "====================================="
288+
289+
exit "$valgrind_exit_code"
290+
shell: bash

0 commit comments

Comments
 (0)