Clean up Travis build a bit in preparation for osx/win.

This commit is contained in:
iphydf 2016-08-24 23:52:34 +01:00
parent c0d84ab489
commit 37c041f815
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
15 changed files with 35 additions and 54 deletions

View File

@ -5,11 +5,9 @@ matrix:
- env: JOB=hstox ENV=linux
language: haskell
ghc: 7.8
- env: JOB=toxcore ENV=linux
compiler: clang
- env: JOB=toxcore ENV=linux
compiler: gcc
- env: JOB=autotools ENV=linux
compiler: gcc
- env: JOB=toxcore ENV=linux
compiler: clang
addons:

View File

@ -923,7 +923,7 @@ loop_top:
}
if (counter != last_count) {
printf("got to %u\n", counter);
printf("many_clients got to %u\n", counter);
last_count = counter;
}
@ -1115,6 +1115,8 @@ loop_top:
ck_assert_msg(num != UINT32_MAX && test == TOX_ERR_FRIEND_ADD_OK, "Failed to add friend error code: %i", test);
}
uint16_t last_count = 0;
while (1) {
uint16_t counter = 0;
@ -1126,6 +1128,11 @@ loop_top:
}
}
if (counter != last_count) {
printf("many_clients_tcp_b got to %u\n", counter);
last_count = counter;
}
if (counter == NUM_FRIENDS * 2) {
break;
}

View File

@ -1,4 +0,0 @@
#!/bin/sh
set -e -u -x
. other/travis/env-$ENV.sh

View File

@ -1 +0,0 @@
toxcore-install

View File

@ -0,0 +1,3 @@
#!/bin/sh
. other/travis/toxcore-linux-install

View File

@ -1,8 +1,5 @@
#!/bin/sh
set -e -u -x
. other/travis/env-$ENV.sh
# Build toxcore and run tests.
./autogen.sh
./configure \
@ -10,8 +7,7 @@ set -e -u -x
--with-libsodium-headers=$CACHE_DIR/include \
--enable-daemon \
--enable-logging \
--enable-ntox \
CFLAGS="-DTRAVIS_ENV=1"
--enable-ntox
# We use make instead of RUN $MAKE here, because the autotools build will only
# ever run natively on the Linux container, never on a Windows cross compilation

View File

@ -1,11 +1,10 @@
#!/bin/sh
. other/travis/env.sh
CMAKE=cmake
NPROC=`nproc`
CURDIR=$PWD
TESTS=true
RUN() {
"$@"
}
export CMAKE=cmake
export MAKE=make
export PREFIX=$PWD/_install
export NPROC=`nproc`

View File

@ -6,5 +6,6 @@ export OPAMROOT=$CACHE_DIR/.opam
export LD_LIBRARY_PATH=$CACHE_DIR/lib
export PKG_CONFIG_PATH=$CACHE_DIR/lib/pkgconfig
export ASTYLE=$CACHE_DIR/astyle/build/gcc/bin/astyle
export CFLAGS="-O3 -DTRAVIS_ENV=1"
BUILD_DIR=_build

View File

@ -1,4 +0,0 @@
#!/bin/sh
set -e -u -x
. other/travis/env-$ENV.sh

View File

@ -1,8 +1,5 @@
#!/bin/sh
set -e -u -x
. other/travis/env-$ENV.sh
# An initial update is required or the cabal cache will be empty and no packages
# can be installed.
cabal update

View File

@ -1,6 +1,3 @@
#!/bin/sh
set -e -u -x
. other/travis/env-$ENV.sh
make -C ../hstox check-toxcore

View File

@ -1,14 +0,0 @@
#!/bin/sh
set -e -u -x
. other/travis/env-$ENV.sh
# Only submit coverage from the clang build. GCC and clang disagree slightly,
# so we arbitrarily choose the alphabetically first one for the report.
if [ "$CC" = "clang" ]; then
coveralls \
--exclude auto_tests \
--exclude other \
--exclude testing \
--gcov-options '\-lp'
fi

View File

@ -0,0 +1,8 @@
#!/bin/sh
# We only submit coverage from the Linux build.
coveralls \
--exclude auto_tests \
--exclude other \
--exclude testing \
--gcov-options '\-lp'

View File

@ -1,8 +1,5 @@
#!/bin/sh
set -e -u -x
. other/travis/env-$ENV.sh
# Set up opam.
opam init -y
eval `opam config env`

View File

@ -1,15 +1,16 @@
#!/bin/sh
set -e -u -x
. other/travis/env-$ENV.sh
# Enable test coverage recording.
export CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
# 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
RUN $CMAKE -B$BUILD_DIR -H. -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install -DDEBUG=ON -DASSOC_DHT=ON #-DASAN=ON
export CTEST_OUTPUT_ON_FAILURE=1
RUN make -C $BUILD_DIR -j$NPROC -k install
RUN $MAKE -C $BUILD_DIR -j$NPROC -k
RUN $MAKE -C $BUILD_DIR -j$NPROC test
if $TESTS; then
export CTEST_OUTPUT_ON_FAILURE=1
RUN make -C $BUILD_DIR -j$NPROC test
fi