pokki has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I'm setting up continuous integration for some Perl modules and I have an issue with configure phase dependencies. My CI script looks like this:
#!/bin/bash -ex
workspace=$(mktemp -d)
function cleanup {
rm -Rf "$workspace"
}
trap cleanup EXIT
perlbrew exec --with ${perlaxis} "cpanm -nvL '$workspace' --installdeps . && prove -I'$workspace/lib/perl5/' -lrvm t/"
For instance, one module requires Module::Build version 0.4004 or later (for test_requires support). So Build.PL has
configure_requires => {
'Module::Build' => '0.4004',
},
This works when installing the packaged distribution because I can generate META.json, and so cpanm is aware of the configure phase dependencies. However, during CI, we are typically installing dependencies and running tests based on a clone of the repository, which doesn't contain META files (since those are supposed to be generated). So cpanm doesn't know about configure phase dependencies (and since it doesn't upgrade M::B, it also misses the test dependencies, and everything explodes).
What's the right fix here? (In my CI script or in Build.PL or anywhere else.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I install configure phase dependencies automatically without META files available?
by Anonymous Monk on Jan 29, 2016 at 19:38 UTC |