-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (38 loc) · 1.16 KB
/
memcheck.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
name: Memtest
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip test')"
steps:
- uses: actions/checkout@v2
- name: Checkout submodules 🖥️
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Install Valgrind
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y valgrind cmake
cmake --version
valgrind --version
- name: Build ctest 🔨
shell: bash
run: mkdir build && cd build && cmake .. && make -j
env:
CC: gcc-10
CXX: g++-10
- name: Run memtest 👾
shell: bash
run: |
cd build
valgrind --version
ctest --overwrite MemoryCheckCommandOptions="--leak-check=full --error-exitcode=100" -T memcheck
- uses: actions/upload-artifact@v2
if: failure()
with:
name: memcheck-log
path: build/Testing