From: Graham Knop Date: Thu, 29 Aug 2013 16:55:49 +0000 (-0400) Subject: brew custom perls for travis X-Git-Tag: v1.003001~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c5dda91c88e9702db7c1124849a09690370e5628;p=gitmo%2FMoo.git brew custom perls for travis --- diff --git a/.travis.yml b/.travis.yml index 3e258b1..c3ee64b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,9 @@ language: perl perl: - - "5.19" - - "5.18" - - "5.16" - - "5.14" - - "5.12" - - "5.10" - - "5.8" + - "5.8.3" + - "5.8.3_thr" before_install: + - source maint/travis-perlbrew - perlbrew install-cpanm -f - perl -V install: diff --git a/maint/travis-perlbrew b/maint/travis-perlbrew new file mode 100644 index 0000000..f3a4a6c --- /dev/null +++ b/maint/travis-perlbrew @@ -0,0 +1,13 @@ +BREWVER=${TRAVIS_PERL_VERSION/_*/} +BREWOPTS= +[[ "${TRAVIS_PERL_VERSION}_" =~ '_thr_' ]] && BREWOPTS="$BREWOPTS -Duseithreads" + +if ! perlbrew use | grep -q "Currently using $TRAVIS_PERL_VERSION"; then + perlbrew install --as $TRAVIS_PERL_VERSION --notest --noman --verbose $BREWOPTS -j 2 $BREWVER + perlbrew use $TRAVIS_PERL_VERSION + if ! perlbrew use | grep -q "Currently using $TRAVIS_PERL_VERSION"; then + echo "Unable to switch to $TRAVIS_PERL_VERSION - compilation failed...?" 1>&2 + exit 1 + fi +fi +perlbrew install-cpanm -f