From: Peter Rabbitson Date: Wed, 16 Oct 2013 04:08:09 +0000 (+0200) Subject: Build more recent perls concurrently X-Git-Tag: v0.08260~110 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4bbabf15ead15ffb2423e95814727b7d5bf0cda3;p=dbsrgits%2FDBIx-Class.git Build more recent perls concurrently --- diff --git a/maint/travis-ci_scripts/20_install.bash b/maint/travis-ci_scripts/20_install.bash index 4118dfc..7c19a56 100755 --- a/maint/travis-ci_scripts/20_install.bash +++ b/maint/travis-ci_scripts/20_install.bash @@ -34,8 +34,14 @@ fi export PERL_CPANM_OPT="--verbose --no-interactive --no-man-pages $( echo $PERL_CPANM_OPT | sed 's/--skip-satisfied//' )" if [[ -n "$BREWVER" ]] ; then - run_or_err "Compiling/installing Perl $BREWVER (without testing, may take up to 5 minutes)" \ - "perlbrew install --as $BREWVER --notest --noman --verbose $BREWOPTS -j 2 $BREWVER" + # since perl 5.14 a perl can safely be built concurrently with -j$large + # (according to brute force testing and my power bill) + if [[ "$BREWVER" == "blead" ]] || perl -Mversion -e "exit !!(version->new(q($BREWVER)) < 5.014)" ; then + perlbrew_jopt="$NUMTHREADS" + fi + + run_or_err "Compiling/installing Perl $BREWVER (without testing, using ${perlbrew_jopt:-1} threads, may take up to 5 minutes)" \ + "perlbrew install --as $BREWVER --notest --noman --verbose $BREWOPTS -j${perlbrew_jopt:-1} $BREWVER" # can not do 'perlbrew uss' in the run_or_err subshell above, or a $() # furthermore `perlbrew use` returns 0 regardless of whether the perl is