forked from adplug/adplug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
91 lines (78 loc) · 2.64 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
sudo: false
language: cpp
os:
- linux
- osx
compiler:
- clang
- gcc
addons:
apt:
packages:
- texlive-latex-base
- texinfo
install:
# Prepare for local installs
- export LOCAL_INSTALL="$HOME/local"; mkdir "$LOCAL_INSTALL" && export PKG_CONFIG_PATH="$LOCAL_INSTALL/lib/pkgconfig"
# Install libbinio
- git clone http://github.com/adplug/libbinio.git
- pushd libbinio && autoreconf -i && ./configure --prefix="$LOCAL_INSTALL" --enable-maintainer-mode && make && make install && popd
# Install modern pkg-config for PKG_INSTALLDIR
- |
if [[ ${TRAVIS_OS_NAME} == linux ]]; then
wget https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz && tar -xzf pkg-config-*.tar.gz
pushd pkg-config-* && ./configure --prefix="${LOCAL_INSTALL}" && make install && popd
export ACLOCAL_PATH="${LOCAL_INSTALL}"/share/aclocal/
fi
before_script:
- autoreconf -i
script:
- ./configure || cat config.log
- |
if [[ ${TRAVIS_OS_NAME} == osx ]]; then
# - macOS's /usr/bin/texi2dvi is broken
# - Furthermore, trying to get a working
# TeX installation on macOS in Travis
# is a futile endeavour, hence just run
# tests.
export TARGET=check
elif [[ ${TRAVIS_OS_NAME} == linux ]]; then
export TARGET=distcheck
fi
- ulimit -c unlimited -S && make "${TARGET}"
after_failure:
- |-
for I in test/*.log; do
echo === $I ===
cat $I
done
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
if [ -f core ]; then
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:./src/.libs/"
gdb ./tests/.libs/tests core -ex "thread apply all bt" -ex "set pagination 0" -batch
else
echo "No core dump; skipping gdb for backtrace"
fi
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# Make the build output lib dir located where dylib looks as default fallback,
# since setting DYLD_FALLBACK_LIBRARY_PATH doesn't seem to work
ln -s `pwd`"/src/.libs" "$HOME/lib"
# Run the tests with core dumps enabled
ulimit -c unlimited && ./tests/.libs/tests --no_catch_system_errors
# Look for a core dump and examine it if found
COREFILE=`ls -t /cores/* | head -n1`
if [ -f "$COREFILE" ]; then
echo "Found core dump: $COREFILE"
lldb -c "$COREFILE" --batch -o 'thread backtrace all' -o 'quit'
else
echo "No core dump; skipping lldb for backtrace"
fi
else
echo "Unknown OS, cannot check for core dump"
fi
for I in test/*.test; do
echo === Failed test output for $I [first 200 lines only] ===
head -n 200 $I
done
sleep 5
- echo == End of test log ==