summaryrefslogtreecommitdiff
path: root/other/travis/toxcore-script
blob: 196fd76e93b6a0b3ed009bbaa4948d7f6948c909 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

set -e -u -x
. other/travis/env-$ENV.sh

# 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   > toxcore/tox.h
../apidsl/_build/apigen.native other/apidsl/toxav.in.h > toxav/toxav.h
# 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"
RUN $CMAKE -B$BUILD_DIR -H. -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DLOGGING=ON -DDEBUG=ON

export CTEST_OUTPUT_ON_FAILURE=1

RUN $MAKE -C $BUILD_DIR -j$NPROC -k
RUN $MAKE -C $BUILD_DIR -j$NPROC test