Skip to content

Commit

Permalink
Run memcheck with CI (#14)
Browse files Browse the repository at this point in the history
* Add call to memcheck in CI

* Install to $CONDA_PREFIX

* Use apt instead of conda package
  • Loading branch information
mdpiper authored Apr 20, 2021
1 parent 24a7c27 commit a1e6d25
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/conda-and-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,28 @@ jobs:

- name: Configure cmake
working-directory: ${{ github.workspace }}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
run: |
cmake $GITHUB_WORKSPACE \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
- name: Build
working-directory: ${{ github.workspace }}/build
run: cmake --build . --config ${{ matrix.build-type }}
run: cmake --build . --target install --config ${{ matrix.build-type }}

- name: Test
working-directory: ${{ github.workspace }}/build
run: ctest -C ${{ matrix.build-type }} --output-on-failure

- name: Memcheck
if: matrix.os == 'ubuntu-latest'
working-directory: ${{ github.workspace }}/examples
run: |
sudo apt-get install -y valgrind
valgrind \
--tool=memcheck \
--leak-check=yes \
--show-reachable=yes \
--num-callers=20 \
--track-fds=yes \
run_bmiheatf test1.cfg

0 comments on commit a1e6d25

Please sign in to comment.