#!/bin/sh set -e -x BUILD_DIR=_build # Check if toxcore.h and toxav.h match apidsl tox.in.h and toxav.in.h. ../apidsl/_build/apigen.native other/apidsl/tox.in.h | $ASTYLE --options=other/astyle/astylerc > toxcore/tox.h ../apidsl/_build/apigen.native other/apidsl/toxav.in.h | $ASTYLE --options=other/astyle/astylerc > toxav/toxav.h # Check if the code is formatted according to the astyle configuration. $ASTYLE --options=other/astyle/astylerc `find . -name "*.[ch]" -and -not -name "*.in.*" -and -not -wholename "*crypto_pwhash*" -and -not -wholename "./super_donators/*"` git diff --exit-code # Build toxcore and run tests. export CFLAGS="-O0 -Wall -Wextra -fprofile-arcs -ftest-coverage -DTRAVIS_ENV=1" cmake -B$BUILD_DIR -H. export CTEST_OUTPUT_ON_FAILURE=1 make -C $BUILD_DIR -j `nproc` make -C $BUILD_DIR -j `nproc` test