Skip to content

Commit 2cf552e

Browse files
committed
build: add valgrind ci workflow for memory issue detection
This commit introduces a GitHub Actions workflow (`valgrind.yml`) to detect memory issues in the `argtable3` project using Valgrind. The workflow runs on `push` and `pull_request` events targeting the `master` branch, as well as manually via `workflow_dispatch`. Purpose: - Use Valgrind to identify memory leaks and invalid memory accesses. - Automate memory issue detection during CI to improve code quality.
1 parent 60c8e93 commit 2cf552e

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/valgrind.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Valgrind
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
9+
jobs:
10+
valgrind-check:
11+
name: Valgrind Memory Check
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout Code
16+
uses: actions/checkout@v3
17+
18+
- name: Install Dependencies
19+
run: |
20+
sudo apt-get update
21+
sudo apt-get install -y build-essential cmake valgrind
22+
23+
- name: Build Project
24+
run: |
25+
mkdir -p build
26+
cd build
27+
cmake -DCMAKE_BUILD_TYPE=Debug ..
28+
make
29+
30+
- name: Run Tests with Valgrind
31+
run: |
32+
cd build
33+
valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1 tests/test_src

0 commit comments

Comments
 (0)