2020-12-07 08:41:25 +01:00
# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
name : valgrind
2022-05-25 21:36:59 +02:00
# on: [push, pull_request]
on : workflow_dispatch
2020-12-07 08:41:25 +01:00
jobs :
build :
runs-on : ubuntu-20.04
steps :
- uses : actions/checkout@v2
- name : Prepare
run : |
sudo apt-get update
sudo apt-get install debian-goodies ubuntu-dbgsym-keyring
2021-03-21 22:25:57 +01:00
# the key expired and the ubuntu-dbgsym-keyring package does not yet include the latest one - see https://bugs.launchpad.net/ubuntu/+source/ubuntu-keyring/+bug/1920640
wget -O - http://ddebs.ubuntu.com/dbgsym-release-key.asc | sudo apt-key add -
2020-12-07 08:41:25 +01:00
- name : Add debug repos on ubuntu
run : |
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ddebs.list
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs)-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ddebs.list
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs)-proposed main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ddebs.list
- name : Install missing software
run : |
sudo apt-get update
sudo apt-get install libxml2-utils
sudo apt-get install valgrind
sudo apt-get install libc6-dbg-amd64-cross
- name : Build cppcheck
run : |
2022-04-11 07:30:55 +02:00
CXXFLAGS="-O1 -g" make -j$(nproc) HAVE_RULES=yes MATCHCOMPILER=yes
2020-12-07 08:41:25 +01:00
- name : Build test
run : |
2022-04-11 07:30:55 +02:00
CXXFLAGS="-O1 -g" make -j$(nproc) testrunner HAVE_RULES=yes MATCHCOMPILER=yes
2020-12-07 08:41:25 +01:00
- name : Run valgrind
run : |
valgrind --error-limit=yes --leak-check=full --num-callers=50 --show-reachable=yes --track-origins=yes --suppressions=valgrind/testrunner.supp --gen-suppressions=all --log-fd=9 --error-exitcode=42 ./testrunner TestGarbage TestOther TestSimplifyTemplate 9>memcheck.log
cat memcheck.log
- uses : actions/upload-artifact@v2
with :
name : Logs
path : ./*.log