Valgrind #491
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Valgrind | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 1 * * *" | |
push: | |
pull_request: | |
jobs: | |
valgrind: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Check for updates and install them | |
run: | | |
sudo apt-get update && sudo apt-get full-upgrade -y | |
- name: Install package | |
run: | | |
sudo apt-get -y install valgrind | |
- name: Build | |
run: | | |
make all | |
- name: Verify Changed files | |
uses: tj-actions/[email protected] | |
id: verify-changed-files | |
with: | |
files: | | |
test/* | |
- name: Test changed files | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
run: | | |
files=(${{ steps.verify-changed-files.outputs.changed_files }}) | |
for ((i = 0; i < ${#files[@]}; i++)) | |
do | |
valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all "${files[$i]}"; | |
done |