-
Notifications
You must be signed in to change notification settings - Fork 1.5k
63 lines (52 loc) · 1.99 KB
/
valgrind.yml
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
# 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:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.workflow }}-${{ runner.os }}
- name: Install missing software
run: |
sudo apt-get update
sudo apt-get install libxml2-utils
sudo apt-get install valgrind
sudo apt-get install libboost-container-dev
sudo apt-get install debuginfod
- name: Build cppcheck
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
CXXFLAGS="-O1 -g -w -DHAVE_BOOST" make -j$(nproc) HAVE_RULES=yes MATCHCOMPILER=yes
- name: Build test
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
CXXFLAGS="-O1 -g -w -DHAVE_BOOST" make -j$(nproc) testrunner HAVE_RULES=yes MATCHCOMPILER=yes
- name: Run valgrind
run: |
ec=0
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 || ec=1
cat memcheck.log
exit $ec
# TODO: debuginfod.ubuntu.com is currently not responding to any requests causing it to run into a 40(!) minute timeout
#env:
# DEBUGINFOD_URLS: https://debuginfod.ubuntu.com
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: Logs
path: ./*.log