2016-08-10 19:28:33 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-11-15 17:48:48 +08:00
|
|
|
if perl -e '
|
|
|
|
use Socket qw(PF_INET6 SOCK_STREAM pack_sockaddr_in6 IN6ADDR_LOOPBACK);
|
|
|
|
|
|
|
|
socket(S, PF_INET6, SOCK_STREAM, 0) || exit 1;
|
|
|
|
bind(S, pack_sockaddr_in6(0, IN6ADDR_LOOPBACK)) || exit 1;
|
|
|
|
'; then
|
|
|
|
IPV6_FLAG="--enable-ipv6"
|
|
|
|
else
|
|
|
|
IPV6_FLAG="--disable-ipv6"
|
|
|
|
fi
|
|
|
|
|
2017-01-12 01:53:26 +08:00
|
|
|
# Build toxcore with some custom flags here. Note that this does *not* run the
|
|
|
|
# tests, so any flags passed here are irrelevant to testing. This only checks
|
|
|
|
# that we can build toxcore with the specified flags. Tests run with default
|
|
|
|
# configure flags.
|
2016-08-10 19:28:33 +08:00
|
|
|
./autogen.sh
|
2016-08-18 00:36:05 +08:00
|
|
|
./configure \
|
2017-01-06 03:05:10 +08:00
|
|
|
--with-nacl-libs=$CACHE_DIR/lib/amd64 \
|
|
|
|
--with-nacl-headers=$CACHE_DIR/include/amd64 \
|
|
|
|
--enable-nacl \
|
2016-08-10 19:28:33 +08:00
|
|
|
--enable-daemon \
|
|
|
|
--enable-logging \
|
2017-11-15 17:48:48 +08:00
|
|
|
$IPV6_FLAG \
|
2016-12-12 04:38:26 +08:00
|
|
|
--with-log-level=TRACE
|
2016-08-10 19:28:33 +08:00
|
|
|
|
2016-08-11 20:49:49 +08:00
|
|
|
# We use make instead of RUN $MAKE here, because the autotools build will only
|
|
|
|
# ever run natively on the Linux container, never on a Windows cross compilation
|
|
|
|
# docker instance or an OSX machine.
|
2016-12-12 04:38:26 +08:00
|
|
|
make -j$NPROC -k
|
2017-01-12 01:53:26 +08:00
|
|
|
|
|
|
|
# This runs `make check` with the default configure flags, not with the ones
|
|
|
|
# above.
|
2017-03-27 00:15:36 +08:00
|
|
|
TESTS $MAX_TEST_RETRIES make distcheck -j$NPROC -k
|