Travis and Dist::Zilla projects

Getting started with Travis

I felt like I should give Travis a try and picked a recent github project of mine that I knew had a decent testsuite.

The instructions on how to get started with travis were quite simple and soon the project had its own travis page.

Unknown build failure

I wondered why the build failed after adding a very simple .travis.yml file to the project.

$ cpanm --quiet --installdeps --notest .

! Configuring . failed. See /home/travis/.cpanm/work/1411809721.1412/build.log for details.

The command "eval cpanm --quiet --installdeps --notest ." failed. Retrying, 2 of 3.

So cpanm failed, but where can I see what's written in the log? My attempts to view it with the travis directive "after_failure" failed and after trying a few more things I checked the project files again. I noticed it was a Dist::Zilla project and there was no Makefile.PL or Build.PL present and travis needs either of them to get started.

I kind of lost interest at that point and worked on something else but luckily I asked on and the next time I checked the channel I saw what haarg wrote.

Perl community to the rescue

11:55 < davewood> im trying to add travis-ci to a project but it keeps saying Configuring failed. the cpanm lofgiles are not accessible, i tried with after_script and after_failure directives in .travis.yml
14:47 < haarg> davewood: travis doesn't know how to build dzil dists
14:47 < haarg> davewood: you might try this:
here is the paste in case it gets deleted
language: perl
  - "5.8"
  - "5.10"
  - "5.12"
  - "5.14"
  - "5.16"
  - "5.18"
  - "5.20"
  - git clone git:// ~/travis-perl-helpers
  - source ~/travis-perl-helpers/init --auto

"travis-perl-helpers is a set of utilities meant to aid in testing modules on travis-ci. It will automatically build perl if the version requested doesn't exist."

It takes care of installing the build requirements and probably a ton of other stuff that I decided to not look into. It just works and all I care about for now is that I have a nice build history for each commit.

Leave a comment

About davewood

user-pic I like Toast.