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-09-29 22:00:08 +02:00
|
|
|
on: [push, pull_request]
|
2020-12-07 08:41:25 +01:00
|
|
|
|
2022-08-26 23:25:07 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-12-07 08:41:25 +01:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
2022-05-31 19:55:57 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2020-12-07 08:41:25 +01:00
|
|
|
|
|
|
|
steps:
|
2022-10-11 19:50:59 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-03 21:21:24 +02:00
|
|
|
|
|
|
|
- name: ccache
|
|
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
|
|
|
with:
|
|
|
|
key: ${{ github.workflow }}-${{ runner.os }}
|
|
|
|
|
2020-12-07 08:41:25 +01:00
|
|
|
- name: Install missing software
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install libxml2-utils
|
|
|
|
sudo apt-get install valgrind
|
2022-09-27 18:49:18 +02:00
|
|
|
sudo apt-get install libboost-container-dev
|
2023-01-07 23:31:22 +01:00
|
|
|
sudo apt-get install debuginfod
|
2020-12-07 08:41:25 +01:00
|
|
|
|
|
|
|
- name: Build cppcheck
|
|
|
|
run: |
|
2022-09-03 21:21:24 +02:00
|
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
2022-09-27 18:49:18 +02:00
|
|
|
CXXFLAGS="-O1 -g -DHAVE_BOOST" make -j$(nproc) HAVE_RULES=yes MATCHCOMPILER=yes
|
2020-12-07 08:41:25 +01:00
|
|
|
|
|
|
|
- name: Build test
|
|
|
|
run: |
|
2022-09-03 21:21:24 +02:00
|
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
2022-09-27 18:49:18 +02:00
|
|
|
CXXFLAGS="-O1 -g -DHAVE_BOOST" make -j$(nproc) testrunner HAVE_RULES=yes MATCHCOMPILER=yes
|
2020-12-07 08:41:25 +01:00
|
|
|
|
|
|
|
- name: Run valgrind
|
|
|
|
run: |
|
2023-01-18 17:01:26 +01:00
|
|
|
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
|
2020-12-07 08:41:25 +01:00
|
|
|
cat memcheck.log
|
2023-01-18 17:01:26 +01:00
|
|
|
exit $ec
|
2023-01-07 23:31:22 +01:00
|
|
|
env:
|
|
|
|
DEBUGINFOD_URLS: https://debuginfod.ubuntu.com
|
2020-12-07 08:41:25 +01:00
|
|
|
|
2022-10-11 19:50:59 +02:00
|
|
|
- uses: actions/upload-artifact@v3
|
2023-01-18 17:01:26 +01:00
|
|
|
if: success() || failure()
|
2020-12-07 08:41:25 +01:00
|
|
|
with:
|
|
|
|
name: Logs
|
|
|
|
path: ./*.log
|