-
Notifications
You must be signed in to change notification settings - Fork 78
/
.travis.sh
executable file
·53 lines (44 loc) · 1.36 KB
/
.travis.sh
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
#!/bin/bash
set -e
BOOTSTRAP_OPTIONS=
CONFIGURE_OPTIONS=()
export CFLAGS="-O0 -g"
test "$CC" = "clang" && export CXX="clang++"
if [[ $TRAVIS_OS_NAME = 'osx' ]]; then
CONFIGURE_OPTIONS+=("")
# Install Libmicrohttpd from source
cd ..
wget https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.55.tar.gz
tar zxf libmicrohttpd-0.9.55.tar.gz && cd libmicrohttpd-0.9.55
./configure
make clean
make -j3
make install
cd - && cd wget2
else
CONFIGURE_OPTIONS+=("--enable-valgrind-tests")
fi
# TravisCI has old gettext
sed 's/\[0.19.3\]/[0.18.2\]/g' configure.ac >configure.ac.tmp
mv configure.ac.tmp configure.ac
./bootstrap ${BOOTSTRAP_OPTIONS}
for OPTS in "${CONFIGURE_OPTIONS[@]}"; do
./configure -C $OPTS
if test "$TRAVIS_OS_NAME" = 'osx'; then
# On OSX we are unable to find the Wget2 dylibs without
# installing first. However `make install` on linux systems
# fail due to insufficient permissions
make install -j3
fi
if make clean check -j3; then :; else
test -f fuzz/test-suite.log && tail -1000 fuzz/test-suite.log
test -f unit-tests/test-suite.log && tail -1000 unit-tests/test-suite.log
test -f tests/test-suite.log && tail -1000 tests/test-suite.log
exit 1
fi
done
make distcheck -j3
if [[ $CC = 'gcc' && $TRAVIS_OS_NAME = 'linux' ]]; then
make check-coverage
coveralls --include libwget/ --include src/ -e "libwget/<stdout>" -e lib/ -e tests/
fi