2016-07-13 20:12:11 +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
|
|
|
|
2016-07-13 20:12:11 +08:00
|
|
|
# Check if toxcore.h and toxav.h match apidsl tox.in.h and toxav.in.h.
|
2016-08-20 06:36:49 +08:00
|
|
|
../apidsl/_build/apigen.native other/apidsl/tox.in.h > toxcore/tox.h
|
|
|
|
../apidsl/_build/apigen.native other/apidsl/toxav.in.h > toxav/toxav.h
|
2016-08-09 20:46:41 +08:00
|
|
|
# Check if the code is formatted according to the astyle configuration.
|
2016-08-20 06:36:49 +08:00
|
|
|
other/astyle/format-source
|
2016-07-13 20:12:11 +08:00
|
|
|
git diff --exit-code
|
|
|
|
|
|
|
|
# Build toxcore and run tests.
|
2016-08-18 00:36:05 +08:00
|
|
|
export CFLAGS="-O3 -fprofile-arcs -ftest-coverage -DTRAVIS_ENV=1"
|
2016-08-20 06:31:01 +08:00
|
|
|
RUN $CMAKE -B$BUILD_DIR -H. -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DLOGGING=ON -DDEBUG=ON -DASSOC_DHT=ON
|
2016-08-10 19:28:33 +08:00
|
|
|
|
|
|
|
export CTEST_OUTPUT_ON_FAILURE=1
|
2016-07-13 20:12:11 +08:00
|
|
|
|
2016-08-18 00:36:05 +08:00
|
|
|
RUN $MAKE -C $BUILD_DIR -j$NPROC -k
|
|
|
|
RUN $MAKE -C $BUILD_DIR -j$NPROC test
|