From: Peter Rabbitson <ribasushi@cpan.org>
Date: Thu, 25 Sep 2014 02:41:29 +0000 (+0200)
Subject: (travis) Cut the amount of threads we use in half
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bc418819ff5144637045abb29ad5e323053eef79;p=dbsrgits%2FDBIx-Class-Historic.git

(travis) Cut the amount of threads we use in half

Hopefully this will stave off the out of memory issues
https://github.com/travis-ci/travis-ci/issues/2715
https://github.com/travis-ci/travis-ci/issues/2101
---

diff --git a/maint/travis-ci_scripts/10_before_install.bash b/maint/travis-ci_scripts/10_before_install.bash
index fe3d35b..b6b04b1 100755
--- a/maint/travis-ci_scripts/10_before_install.bash
+++ b/maint/travis-ci_scripts/10_before_install.bash
@@ -11,7 +11,7 @@ if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then return ; fi
 # The oneliner is a tad convoluted - basicaly what we do is
 # slurp the entire file and get the index off the last
 # `processor    : XX` line
-export NUMTHREADS="$(( $(perl -0777 -n -e 'print (/ (?: .+ ^ processor \s+ : \s+ (\d+) ) (?! ^ processor ) /smx)' < /proc/cpuinfo) + 1 ))"
+export NUMTHREADS="$(( ( $(perl -0777 -n -e 'print (/ (?: .+ ^ processor \s+ : \s+ (\d+) ) (?! ^ processor ) /smx)' < /proc/cpuinfo) + 1 ) / 2 ))"
 
 export CACHE_DIR="/tmp/poormanscache"