diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f0d9605e3..fe067293c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -206,3 +206,33 @@ jobs: cd build ninja llvm_coverage if [ `ninja llvm_coverage | grep TOTAL | sed 's/ /\n/g' | grep "100.00%" | wc -l | sed 's/ //g'` -eq 4 ]; then exit 0; else exit 1; fi + memory_leaks: + name: Memory leaks + runs-on: ubuntu-latest + strategy: + fail-fast: false + env: + BUILDCACHE_ACCURACY: STRICT + BUILDCACHE_COMPRESS_FORMAT: ZSTD + BUILDCACHE_DEBUG: -1 + BUILDCACHE_LOG_FILE: "" + steps: + - name: Check out libCellML + uses: actions/checkout@v4 + - name: Install CMake and Ninja + uses: lukka/get-cmake@latest + - name: Install buildcache + uses: mikehardy/buildcache-action@v2 + - name: Install Valgrind + run: | + sudo apt update + sudo apt install valgrind + - name: Configure libCellML + run: | + mkdir build + cd build + cmake -G Ninja -DBINDINGS_PYTHON=OFF .. + - name: Memory leaks + run: | + cd build + ninja memcheck