From 4171f9b8080e28bde15036e21b28aebd13685a77 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Thu, 25 Jan 2018 19:21:42 +0100 Subject: [PATCH 1/2] Use parallel builds in Travis CI Don't use it when building samples. It randomly results in build errors with 'file not recognized: File truncated'. --- build/tools/travis-ci.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index 3dfcc673a6..228e6d653b 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -4,6 +4,14 @@ set -e +wxPROC_COUNT=`getconf _NPROCESSORS_ONLN` +((wxPROC_COUNT++)) +if [ "$wxTOOLSET" == "cmake" ] && [ "$wxCMAKE_GENERATOR" == "Xcode" ]; then + wxJOBS="-jobs $wxPROC_COUNT" +else + wxJOBS="-j$wxPROC_COUNT" +fi + case $wxTOOLSET in cmake) if [ `uname -s` = "Linux" ] && [ `lsb_release -cs` = "precise" ]; then @@ -22,7 +30,7 @@ case $wxTOOLSET in echo 'travis_fold:end:configure' echo 'travis_fold:start:building' echo 'Building...' - cmake --build . + cmake --build . -- $wxJOBS echo 'travis_fold:end:building' if [ "$wxCMAKE_TESTS" != "OFF" ]; then echo 'travis_fold:start:testing' @@ -36,10 +44,10 @@ case $wxTOOLSET in ./configure --disable-optimise $wxCONFIGURE_FLAGS echo -en 'travis_fold:end:script.configure\\r' echo 'Building...' && echo -en 'travis_fold:start:script.build\\r' - make + make $wxJOBS echo -en 'travis_fold:end:script.build\\r' echo 'Building tests...' && echo -en 'travis_fold:start:script.tests\\r' - make -C tests + make -C tests $wxJOBS echo -en 'travis_fold:end:script.tests\\r' echo 'Testing...' && echo -en 'travis_fold:start:script.testing\\r' pushd tests && ./test && popd From c341d72a92ffb512de56a8867bc72ba9fe10b0e0 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Thu, 25 Jan 2018 19:23:53 +0100 Subject: [PATCH 2/2] Remove downloading CppUnit and CMake in Travis CI CppUnit has been replaced by Catch. The Precise build environment is not used, so no need to download CMake for it. --- build/tools/before_install.sh | 2 -- build/tools/travis-ci.sh | 6 ------ 2 files changed, 8 deletions(-) diff --git a/build/tools/before_install.sh b/build/tools/before_install.sh index 444683b503..83a8fed7b3 100755 --- a/build/tools/before_install.sh +++ b/build/tools/before_install.sh @@ -19,7 +19,5 @@ case $(uname -s) in ;; Darwin) - brew update - brew install cppunit --universal ;; esac diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index 228e6d653b..be740109bc 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -14,12 +14,6 @@ fi case $wxTOOLSET in cmake) - if [ `uname -s` = "Linux" ] && [ `lsb_release -cs` = "precise" ]; then - echo Updating CMake... - wget -O - https://cmake.org/files/v3.6/cmake-3.6.2-Linux-x86_64.tar.gz | tar xzf - - export PATH=`pwd`/cmake-3.6.2-Linux-x86_64/bin:$PATH - fi - if [ -z $wxCMAKE_TESTS ]; then wxCMAKE_TESTS=CONSOLE_ONLY; fi cmake --version echo 'travis_fold:start:configure'