toxcore/other/travis/toxcore-script

20 lines
589 B
Bash
Executable File

#!/bin/sh
set -e -u -x
. other/travis/env-$ENV.sh
# Check if the code is formatted according to the astyle configuration.
other/astyle/format-source
git diff --exit-code
# Build toxcore and run tests.
export CFLAGS="-O3 -fprofile-arcs -ftest-coverage -DTRAVIS_ENV=1"
# TODO(iphydf): Enable ASAN. It currently has some bad interactions with gcov,
# so it's disabled on Travis.
RUN $CMAKE -B$BUILD_DIR -H. -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DDEBUG=ON -DASSOC_DHT=ON #-DASAN=ON
export CTEST_OUTPUT_ON_FAILURE=1
RUN $MAKE -C $BUILD_DIR -j$NPROC -k
RUN $MAKE -C $BUILD_DIR -j$NPROC test