Skip to content

Commit a027ba7

Browse files
committed
Add valgrind job
1 parent 2a963bf commit a027ba7

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/c-cpp.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,24 @@ jobs:
7272
token: ${{ secrets.CODECOV_TOKEN }}
7373
file: coverage.info
7474
fail_ci_if_error: false
75+
76+
valgrind:
77+
needs: build
78+
runs-on: ubuntu-latest
79+
steps:
80+
- uses: actions/checkout@v4
81+
82+
- name: Install Valgrind
83+
run: sudo apt-get install -y valgrind
84+
85+
- name: Build Debug version
86+
run: |
87+
cmake -B build-debug -DCMAKE_BUILD_TYPE=Debug
88+
cmake --build build-debug --target ini_parser_tests
89+
90+
- name: Valgrind memory check
91+
run: |
92+
valgrind --leak-check=full \
93+
--track-origins=yes \
94+
--error-exitcode=1 \
95+
./build-debug/ini_parser_tests

0 commit comments

Comments
 (0)