mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
b5cfd33340
Also, fix the hstox build that was taking half an hour. It now takes 5 minutes. Also, perform distcheck on travis to ensure that make dist works. It's not actually failing the build at the moment due to broken tests.
22 lines
835 B
Bash
Executable File
22 lines
835 B
Bash
Executable File
#!/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
|