From 08cd61387ee078b81c50fa2714e9f1534a0865a2 Mon Sep 17 00:00:00 2001 From: iphydf Date: Thu, 5 Jan 2017 21:23:06 +0000 Subject: [PATCH] Add an OSX build that doesn't run tests. This one is not allowed to fail and ensures that toxcore can at least be built for OSX. --- .travis.yml | 11 ++++++++--- other/travis/env-linux.sh | 1 + other/travis/env-windows.sh | 13 +++++-------- other/travis/toxcore-script | 4 +++- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 58d7db21..8716630b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,13 @@ language: c matrix: include: + # OSX build comes first because Travis queues builds in order. The OSX + # builds are often pushed on a very long (100-200 jobs) backlog, so they get + # highest priority in our build sequence. + - env: JOB=toxcore ENV=osx RUN_TESTS=false + os: osx + - env: JOB=toxcore ENV=osx RUN_TESTS=true + os: osx - env: JOB=hstox ENV=linux language: haskell ghc: 7.8 @@ -9,8 +16,6 @@ matrix: compiler: gcc - env: JOB=toxcore ENV=linux compiler: clang - - env: JOB=toxcore ENV=osx - os: osx - env: JOB=toxcore ENV=windows ARCH=i686 services: - docker @@ -19,7 +24,7 @@ matrix: - docker fast_finish: true allow_failures: - - os: osx + - env: JOB=toxcore ENV=osx RUN_TESTS=true addons: apt: diff --git a/other/travis/env-linux.sh b/other/travis/env-linux.sh index 10b4fe82..dd5a6f7f 100644 --- a/other/travis/env-linux.sh +++ b/other/travis/env-linux.sh @@ -4,6 +4,7 @@ CMAKE=cmake CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DFORMAT_TEST=ON" NPROC=`nproc` CURDIR=$PWD +RUN_TESTS=true RUN() { "$@" diff --git a/other/travis/env-windows.sh b/other/travis/env-windows.sh index 0ea1f726..7ae6ea25 100644 --- a/other/travis/env-windows.sh +++ b/other/travis/env-windows.sh @@ -4,13 +4,12 @@ CMAKE=$ARCH-w64-mingw32.shared-cmake CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DBOOTSTRAP_DAEMON=OFF -DCOMPILE_AS_CXX=ON" NPROC=`nproc` CURDIR=/work +RUN_TESTS=false RUN() { ./dockcross "$@" } -ENABLE_WINDOWS_TESTS=false - TESTS() { # Download Microsoft DLLs. curl http://www.dlldump.com/dllfiles/I/iphlpapi.dll -o _build/iphlpapi.dll @@ -20,10 +19,8 @@ TESTS() { ./dockcross sh -c 'cp $WINEDLLPATH/*.dll _build' # Run tests in docker. - if $ENABLE_WINDOWS_TESTS; then - ./dockcross "$@" || { - cat _build/Testing/Temporary/LastTest.log - false - } - fi + ./dockcross "$@" || { + cat _build/Testing/Temporary/LastTest.log + false + } } diff --git a/other/travis/toxcore-script b/other/travis/toxcore-script index 9b81b863..c6c0dd41 100755 --- a/other/travis/toxcore-script +++ b/other/travis/toxcore-script @@ -37,4 +37,6 @@ RUN $CMAKE \ export CTEST_OUTPUT_ON_FAILURE=1 RUN make -C$BUILD_DIR -j$NPROC -k install -TESTS make -C$BUILD_DIR -j$NPROC test +if $RUN_TESTS; then + TESTS make -C$BUILD_DIR -j$NPROC test +fi