2016-08-10 19:28:33 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-08-11 20:49:49 +08:00
|
|
|
set -e -u -x
|
|
|
|
. other/travis/env-$ENV.sh
|
2016-08-10 19:28:33 +08:00
|
|
|
|
|
|
|
# Build toxcore and run tests.
|
|
|
|
./autogen.sh
|
2016-08-11 20:49:49 +08:00
|
|
|
RUN ./configure \
|
2016-08-10 19:28:33 +08:00
|
|
|
--with-libsodium-libs=$CACHE_DIR/lib \
|
|
|
|
--with-libsodium-headers=$CACHE_DIR/include \
|
|
|
|
--enable-daemon \
|
|
|
|
--enable-logging \
|
|
|
|
--enable-ntox
|
|
|
|
|
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.
|
|
|
|
make -j`nproc`
|
|
|
|
|
2016-08-10 19:28:33 +08:00
|
|
|
# This doesn't currently work on Travis, because the autotools build is broken.
|
|
|
|
# It does not look up libsodium by pkg-config, so without the --with flags it
|
|
|
|
# won't find it. We don't care that much about distcheck at this point, but we
|
|
|
|
# do care whether it configures/builds at all, which is exercised by the make
|
|
|
|
# call above. Tests are executed by the cmake build.
|
2016-08-11 20:49:49 +08:00
|
|
|
echo "*** make distcheck currently fails; see https://github.com/TokTok/toxcore/blob/master/other/travis/autotools-script#L16 ***"
|
|
|
|
make distcheck -j`nproc` \
|
|
|
|
|| echo "*** make distcheck has failed as expected; don't be alarmed ***"
|