CI: install Devel::CheckLib before resolving the dependencies
cpanm runs Makefile.PL to find out what a distribution needs, so everything
Makefile.PL itself uses has to be installed before that. It uses
Devel::CheckLib to look for libcollocatordb, which is not part of the CI image,
so Makefile.PL aborted at its use statement, wrote no Makefile and cpanm gave
up with "Configuring /builds/ids-kl/derekovecs ... N/A". Listing the module in
PREREQ_PM cannot help, as those are only known after Makefile.PL has run.
This worked locally only because of an uncommitted inc/Devel/CheckLib.pm, which
Makefile.PL picks up via "use lib qw(inc)".
The Dockerfile already installs Devel::CheckLib explicitly for the same reason,
CI does it now as well. Makefile.PL declares it in CONFIGURE_REQUIRES, so that
installations from a distribution tarball pull it in by themselves.
Verified with gitlab-ci-local: build-and-test passes, 12 tests in 2 files.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Change-Id: Id1aee5f978092bf33594e081d43893f1ac78c692
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6db6f32..8a0d1c1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -71,6 +71,9 @@
script:
- start_section build_perl_dependencies "Installing Perl dependencies"
- cpanm -n -l $PERL_LOCAL_LIB_ROOT https://github.com/Akron/Mojolicious-Plugin-Localize.git
+ # Makefile.PL uses Devel::CheckLib to look for libcollocatordb, so it has to
+ # be there before --installdeps can determine the dependencies at all
+ - cpanm -n -l $PERL_LOCAL_LIB_ROOT Devel::CheckLib
- cpanm -n -l $PERL_LOCAL_LIB_ROOT --installdeps .
- end_section build_perl_dependencies