From 4a8cbcb2684638e42cab25d5a04b556234237141 Mon Sep 17 00:00:00 2001 From: apbassett <43486400+apbassett@users.noreply.github.com> Date: Mon, 29 Jul 2024 10:38:33 -0400 Subject: [PATCH] Fixes issue where logs in debug mode weren't saved --- .github/workflows/build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f9d5f5..f341234 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,7 +84,6 @@ jobs: - name: Run Evolver id: run - timeout-minutes: 15 run: | # Install GDB sudo apt-get install -y gdb @@ -98,11 +97,14 @@ jobs: echo "Note: output is supressed due to length. See build artifacts for full logs." echo "Running..." - # Capture GDB output - gdb_output=$(gdb -batch -ex run -ex backtrace --args ./amalgam${{ matrix.amlg-postfix }} --debug-internal-memory tic_tac_toe_evolver.amlg -target-time 300) + # Capture GDB output (15 minute timeout) + gdb_output=$(timeout 900 gdb -batch -ex run -ex backtrace --args ./amalgam${{ matrix.amlg-postfix }} --debug-internal-memory tic_tac_toe_evolver.amlg -target-time 300) gdb_exit_code=$? echo "$gdb_output" >> logs.txt + ls + cat logs.txt | tail -n 6 + # Evaluate GDB exit code and exit this workflow accordingly if [[ $gdb_exit_code -ne 0 ]]; then echo "GDB has exited"