From 42c1be0fd10ef548d4adf6c72538fe10361537f9 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Wed, 7 Nov 2018 14:38:59 -0500 Subject: [PATCH] [CI] fix deploy phase, move coredump backtrace to a script --- .travis.yml | 24 ++++++++++-------------- .travis/print-core-backtrace.sh | 17 +++++++++++++++++ 2 files changed, 27 insertions(+), 14 deletions(-) create mode 100644 .travis/print-core-backtrace.sh diff --git a/.travis.yml b/.travis.yml index cc27f8f22..a21184c22 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,20 +2,6 @@ language: node_js node_js: - 4 -script: - - meson . ./build --buildtype=debugoptimized -Dgc=true -Dprof=true - - cd ./build - - ninja - - sudo ninja install - - cd ../.travis - - ulimit -c unlimited -S - - npm install - # || true so we continue - - npm run -s test || RESULT=$? - - if [[ ${RESULT} -eq 0 ]]; then exit 0; else for i in $(find ./ -maxdepth 1 -name 'core*' -print); do gdb urbit core* -ex "thread apply all bt" -ex "set pagination 0" -batch; done; fi; - - echo "build failed with status code $RESULT" - - exit $RESULT - # Uncomment me if this gets annoying # # notifications: @@ -34,6 +20,16 @@ install: - git checkout $(cat ../.travis/pin-arvo-commit.txt) - cd .. +script: + - meson . ./build --buildtype=debugoptimized -Dgc=true -Dprof=true + - cd ./build + - ninja + - sudo ninja install + - cd ../.travis + - npm install + - ulimit -c unlimited -S + - npm run -s test; bash print-core-backtrace.sh $? + addons: apt: packages: diff --git a/.travis/print-core-backtrace.sh b/.travis/print-core-backtrace.sh new file mode 100644 index 000000000..52b421525 --- /dev/null +++ b/.travis/print-core-backtrace.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -euo pipefail +set -x + +RESULT=$1 + +if [[ ${RESULT} -eq 0 ]]; then + exit 0 +else + for i in $(find ./ -maxdepth 1 -name 'core*' -print) + do + gdb urbit core* -ex "thread apply all bt" -ex "set pagination 0" -batch + done +fi + +echo "build failed with status code $RESULT" +exit $RESULT