[CI] fix deploy phase, move coredump backtrace to a script

This commit is contained in:
Joe Bryan 2018-11-07 14:38:59 -05:00
parent dab09f54e7
commit 42c1be0fd1
2 changed files with 27 additions and 14 deletions

View File

@ -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:

View File

@ -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