brew custom perls for travis
[gitmo/Moo.git] / maint / travis-perlbrew
CommitLineData
c5dda91c 1BREWVER=${TRAVIS_PERL_VERSION/_*/}
2BREWOPTS=
3[[ "${TRAVIS_PERL_VERSION}_" =~ '_thr_' ]] && BREWOPTS="$BREWOPTS -Duseithreads"
4
5if ! perlbrew use | grep -q "Currently using $TRAVIS_PERL_VERSION"; then
6 perlbrew install --as $TRAVIS_PERL_VERSION --notest --noman --verbose $BREWOPTS -j 2 $BREWVER
7 perlbrew use $TRAVIS_PERL_VERSION
8 if ! perlbrew use | grep -q "Currently using $TRAVIS_PERL_VERSION"; then
9 echo "Unable to switch to $TRAVIS_PERL_VERSION - compilation failed...?" 1>&2
10 exit 1
11 fi
12fi
13perlbrew install-cpanm -f