Skip to content

Commit

Permalink
Fix valgrinding
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli committed Dec 3, 2023
1 parent 104eb7a commit dcf0896
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ jobs:
- run: LLVM_CONFIG=llvm-config-${{ matrix.llvm-version }} make
- run: ./runtests.sh --verbose 'jou ${{ matrix.opt-level }} %s'
- run: ./runtests.sh --verbose 'jou ${{ matrix.opt-level }} --verbose %s'
# Valgrinding is slow. Do it only when this file or something in the compiler has been modified.
# Valgrinding is slow, but many files affect valgrind resuls.
# We skip it when all changes are to .md files (docs, README etc)
- name: Figure out if we need to run tests with valgrind
id: check-need-valgrind
run: |
git fetch https://github.com/Akuli/jou main
if git diff --name-only FETCH_HEAD HEAD | grep -E '(\.c|\.h)$|^tests/'; then
# Find modified non-markdown files. If there are any, set doit=yes.
if git diff --name-only FETCH_HEAD HEAD | grep -vE '\.md$'; then
echo doit=yes >> $GITHUB_OUTPUT
else
echo doit=no >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ else
fi

if [ $valgrind = yes ]; then
command_template="valgrind -q --leak-check=full --show-leak-kinds=all --suppressions=valgrind-suppressions.sup $command_template"
command_template="valgrind -q --leak-check=full --show-leak-kinds=all --suppressions='$(pwd)/valgrind-suppressions.sup' $command_template"
fi

if [ $run_make = yes ]; then
Expand Down

0 comments on commit dcf0896

Please sign in to comment.