Unverified Commit dd5cc237 authored by Zhangyi Chen's avatar Zhangyi Chen Committed by GitHub

Find core files and print stack if build failed

parent b9dc646f
......@@ -11,6 +11,13 @@ env:
- PURPOSE=unittest
- PURPOSE=compile-with-bazel
before_script:
- ulimit -c unlimited -S # enable core dumps
after_failure:
- COREFILE=$(find . -maxdepth 2 -name "core*" | head -n 1) # find core file
- if [[ -f "$COREFILE" ]]; then gdb -c "$COREFILE" example -ex "thread apply all bt" -ex "set pagination 0" -batch; fi
before_install:
- wget --no-clobber https://github.com/bazelbuild/bazel/releases/download/0.8.1/bazel_0.8.1-linux-x86_64.deb
- sudo dpkg -i bazel_0.8.1-linux-x86_64.deb
......@@ -18,6 +25,7 @@ before_install:
install:
- sudo apt-get install -qq realpath libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev libgoogle-perftools-dev
- sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo env "PATH=$PATH" cmake . && sudo make && sudo mv libgtest* /usr/lib/ && cd -
- sudo apt-get install -y gdb # install gdb
script:
- sh build_in_travis_ci.sh
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment