Skip to content

Commit

Permalink
Merge branch 'main' into 21148-entity-constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
howsohazard authored Aug 6, 2024
2 parents 6948fde + 49219b9 commit dd202c5
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ jobs:
name: Fuzz tests (${{ matrix.amlg-postfix }})
needs: ["metadata"]
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
amlg-postfix: ['-st', '-mt']
amlg-postfix: ['-st', '-mt-afmi']

steps:

Expand Down Expand Up @@ -84,13 +83,42 @@ jobs:
./amalgam${{ matrix.amlg-postfix }} --version
- name: Run Evolver
timeout-minutes: 20
id: run
run: |
# Install GDB
sudo apt-get install -y gdb
echo "GDB installation complete"
# Don't immediately fail if GDB exits with a non-zero code
set +e
# Set stack size and run (stack size adjustments cannot be done with cmake on Linux)
ulimit -s 524288
echo "Note: output is supressed due to length. See build artifacts for full logs."
echo "Running..."
ulimit -s 524288
./amalgam${{ matrix.amlg-postfix }} tic_tac_toe_evolver.amlg -target-time 180 > logs.txt 2>&1
# 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
# Evaluate GDB exit code and exit this workflow accordingly
if [[ $gdb_exit_code -ne 0 ]]; then
echo "GDB has exited"
echo "$gdb_output" | tail -n 6
# If GDB exited with an error but the test process passed, exit 0
if echo "$gdb_output" | tail -n 6 | grep -q "exited normally"; then
exit 0
# Else, the test process failed, exit 1
else
exit 1
fi
else
# If GDB exited with code 0, there was a segfault
echo "$gdb_output" | tail -n 200
exit 139
fi
- name: Compress 'evolve' directory
if: always()
Expand Down Expand Up @@ -136,4 +164,4 @@ jobs:
name: "${{ github.event.repository.name }} ${{ needs.metadata.outputs.version }}"
artifactErrorsFailBuild: true
body: ${{ needs.generate-changelog.outputs.changelog }}
makeLatest: legacy
makeLatest: legacy

0 comments on commit dd202c5

Please sign in to comment.