Skip to content

Commit

Permalink
Fixes issue where logs in debug mode weren't saved
Browse files Browse the repository at this point in the history
  • Loading branch information
apbassett committed Jul 30, 2024
1 parent af24b2d commit 4a8cbcb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ jobs:
- name: Run Evolver
id: run
timeout-minutes: 15
run: |
# Install GDB
sudo apt-get install -y gdb
Expand All @@ -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"
Expand Down

0 comments on commit 4a8cbcb

Please sign in to comment.