Add Valgrind CI action (#2921)
For now only few testsuites are included. More should be added later.
This commit is contained in:
parent
39a9350f6e
commit
e085d851c0
|
@ -0,0 +1,50 @@
|
||||||
|
# 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
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
- 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 libz3-dev libz3-4 libz3-4-dbgsym
|
||||||
|
sudo apt-get install libc6-dbg-amd64-cross
|
||||||
|
|
||||||
|
- name: Build cppcheck
|
||||||
|
run: |
|
||||||
|
CXXFLAGS="-O1 -g" make -j$(nproc) USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes
|
||||||
|
|
||||||
|
- name: Build test
|
||||||
|
run: |
|
||||||
|
CXXFLAGS="-O1 -g" make -j$(nproc) testrunner USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes
|
||||||
|
|
||||||
|
- 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
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: reachable
|
||||||
|
fun:_Znwm
|
||||||
|
fun:__static_initialization_and_destruction_0
|
||||||
|
fun:_GLOBAL__sub_I_memory_manager.cpp
|
||||||
|
fun:call_init.part.0
|
||||||
|
fun:call_init
|
||||||
|
fun:_dl_init
|
||||||
|
obj:/usr/lib/x86_64-linux-gnu/ld-2.31.so
|
||||||
|
obj:*
|
||||||
|
obj:*
|
||||||
|
obj:*
|
||||||
|
obj:*
|
||||||
|
}
|
Loading…
Reference in New Issue