forked from cppcheck-opensource/cppcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (69 loc) · 3.91 KB
/
valgrind.yml
File metadata and controls
90 lines (69 loc) · 3.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# 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:
test-cppcheck:
name: Run valgrind on cppcheck
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 debug
run: |
CXXFLAGS="-O1 -g" make -j$(nproc) USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes CPPFLAGS="-DCHECK_INTERNAL" VERIFY=1
- name: Run valgrind on cppcheck self-check
run: |
valgrind --error-limit=yes --leak-check=full --num-callers=50 --show-reachable=yes --track-origins=yes --gen-suppressions=all --log-fd=9 --error-exitcode=42 ./cppcheck --enable=style,performance,portability,warning,internal --exception-handling --debug-warnings cli lib -D__CPPCHECK__ --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ -Icli --inconclusive 9>memcheck_cppcheck.log
cat memcheck_cppcheck.log
- uses: actions/upload-artifact@v2
with:
name: Logs
path: ./*.log
test-testrunner:
name: Run valgrind on testrunner
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 test
run: |
CXXFLAGS="-O1 -g" make -j$(nproc) testrunner USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes
- name: Run valgrind on testrunner
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_testrunner.log
cat memcheck_testrunner.log
- uses: actions/upload-artifact@v2
with:
name: Logs
path: ./*.log