--- /dev/null
+language: perl
+perl:
+ - "5.8.1"
+ - "5.8.4"
+ - "5.8"
+ - "5.10"
+ - "5.12"
+ - "5.14"
+ - "5.16"
+ - "5.18"
+matrix:
+ include:
+ - perl: 5.18
+ env: COVERAGE=1
+before_install:
+ - source maint/travis-perlbrew
+ - perlbrew install-cpanm -f
+ - perl -V
+install:
+ - maint/travis-install ExtUtils::MakeMaker
+ - maint/travis-install --deps
+ - "[ -n \"$COVERAGE\" ] && maint/travis-install Devel::Cover Devel::Cover::Report::Coveralls || true"
+ - "[ -n \"$COVERAGE\" ] && cover -delete -silent || true"
+ - "[ -n \"$COVERAGE\" ] && export HARNESS_PERL_SWITCHES='-MDevel::Cover=-ignore,^x?t/,-blib,0' || true"
+script:
+ - prove -lv
+after_success:
+ - "[ -n \"$COVERAGE\" ] && cover -report coveralls || true"
+branches:
+ except:
+ - /^wip\//
+ - /^blocked/
+notifications:
+ email: false
+ irc:
+ channels:
+ - "irc.perl.org#moo-smoke"
+ template:
+ - "%{branch}#%{build_number} by %{author}: %{message} (%{build_url})"
+ on_success: change
+ on_failure: always
+ skip_join: true
--- /dev/null
+#!/bin/bash
+
+function clean_up {
+ kill $PROG
+ wait 2>/dev/null
+}
+
+export PERL_CPANM_OPT="--mirror http://www.cpan.org/"
+
+function cpanm_install {
+ local dep="$1"
+ printf "Installing (without testing) $dep ..."
+ (
+ while true; do
+ sleep 3
+ printf '.'
+ done
+ ) &
+ local PROG=$!
+ trap "clean_up $PROG; exit 1" SIGHUP SIGINT SIGTERM
+ local OUT=$(cpanm --verbose --no-interactive --no-man-pages --notest $dep 2>&1 )
+ local STATUS=$?
+ kill $PROG
+ wait $PROG 2>/dev/null
+ trap - SIGHUP SIGINT SIGTERM
+ if [ $STATUS != 0 ]; then
+ echo ' Failed!'
+ echo "$OUT"
+ exit $?
+ fi
+ echo ' Done'
+}
+
+for arg; do
+ case $arg in
+ --deps)
+ AUTHOR_OPTS=''
+ if [ -z "$AUTHOR_TESTING" ] || [ "$AUTHOR_TESTING" -ne 0 ]; then
+ AUTHOR_OPTS='--with-recommends'
+ fi
+ DEPS="$DEPS $(cpanm --showdeps -q . --with-develop $AUTHOR_OPTS)"
+ for dep in $DEPS; do
+ case $dep in
+ perl*) ;;
+ *)
+ cpanm_install $dep
+ ;;
+ esac
+ done
+ ;;
+ *)
+ cpanm_install $arg
+ ;;
+ esac
+done
--- /dev/null
+BREWVER=${TRAVIS_PERL_VERSION/_*/}
+BREWOPTS=
+[[ "${TRAVIS_PERL_VERSION}_" =~ '_thr_' ]] && BREWOPTS="$BREWOPTS -Duseithreads"
+[[ "$(sed -n -E -e's/^5\.([0-9]+).*/\1/p' <<< $TRAVIS_PERL_VERSION)" -ge 14 ]] && BREWOPTS="$BREWOPTS -j 2"
+
+if ! perlbrew use | grep -q "Currently using $TRAVIS_PERL_VERSION"; then
+ echo "Building perl $TRAVIS_PERL_VERSION..."
+ PERLBUILD=$(perlbrew install --as $TRAVIS_PERL_VERSION --notest --noman --verbose $BREWOPTS $BREWVER 2>&1)
+ 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
+ echo "$PERLBUILD" 1>&2
+ exit 1
+ fi
+fi
+perlbrew install-cpanm -f