Skip to content

Commit

Permalink
Update cmake-multi-platform.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Griezn authored Nov 5, 2024
1 parent 08a6c53 commit 7ea665e
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,16 @@ jobs:
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

- name: Install Valgrind
- name: Run Tests with gdb (Linux only)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y valgrind

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: |
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
# Run tests with Valgrind
valgrind --leak-check=full --track-origins=yes ctest --output-on-failure
else
# Run tests normally for Windows
ctest --output-on-failure
fi
for test_executable in $(find . -type f -executable -name '*_test'); do
echo "Running $test_executable under gdb..."
gdb -batch -ex "run" -ex "bt" --args $test_executable || true
done
- name: Run Tests (Windows only)
if: matrix.os == 'windows-latest'
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --output-on-failure

0 comments on commit 7ea665e

Please sign in to comment.