Bod,
I have found that occasionally in the CI environments (both in GitHub Actions, and in Appveyor and the old free Travis-CI) that sometimes your prereqs don't get properly honored/installed with just the cpanm --installdeps . despite the fact that your Makefile.PL properly says it requires HTTP::Tiny 0.083 or newer.
In those cases, I tend to insert the task to manually install/upgrade ExtUtils::MakeMaker (EUMM), and sometimes other modules. Hence the step in the perl-ci.yml that you got from me:
- name: Pre-Makefile.PL prereqs for older perls
if: ${{ matrix.perl < '5.14' }}
run: |
cpanm --notest ExtUtils::MakeMaker
For your case, since there was a problem with most perls before 5.20, but wasn't present on v5.14 (which already ran that upgrade of EUMM), I thought EUMM might be the culprit. And since the error you were getting was indicating that HTTP::Tiny was an ancient version, I added that to the step to make sure it manually installs 0.083 or newer. This Ubuntu+5.14 run indicates that EUMM was upgraded from 6.57_05 to the current 7.70, and HTTP::Tiny from 0.012 to 0.088. EUMM 6.57_05 is old enough that it's not using all your Makefile.PL features, so there may be something about that older EUMM that's also not properly checking the version during the prerequisite check. )
Changing the perl version to force EUMM upgrade, and adding HTTP::Tiny to it, and renaming the step gives the updated step:
- name: Grab EUMM and HTTP::Tiny 0.083 or newer _before_ running
+ Makefile.PL for older perls
if: ${{ matrix.perl < '5.20' }}
run: |
cpanm --notest ExtUtils::MakeMaker
cpanm HTTP::Tiny~0.083
I suggest replacing that in your copy of perl-ci.yml as well. You can see the state of my copy of WWW-Crawl's perl-ci.yml for these runs... With that, the results show that all but Perl v5.18 on Windows are passing now.
(That single 5.18 fail here appears to be something different, and will have to be debugged separately.)
So to sum up: whenever I have a problem in my CI where it works for my local tests on a group of versions, but when it goes to GitHub Actions or other CI it doesn't work right, especially if there's an error related to a module not having the right version, I first go toward trying to force the CI to use the newest EUMM, and second, I possibly try manually installing stubborn prerequisite modules before the bulk of the prereq installation.
(Since I was the one who helped you with the initial perl-ci.yml, I was a bit embarrassed that it didn't work straightaway for you on this project. Unfortunately, my weekend was swamped, so I didn't get a chance to fork your repo and run experiments until today... Sorry.)
BTW: davorg's TPRC2023 "GitHub Actions for Perl Development" recording may be of interest to you. (In fact, starting around 12:30, it actually shows a pair of steps that would be able to save the logs from the windows+v5.18 failure above -- so that could help you with debugging that problem. (I suggest a branch where your CI just runs Windows and 5.18, rather than all, for quicker debugging of the issue; and changing push: branches: ['main'] to push: branches: '*' so that you can get CI on your debug branches as well. I need to add those two steps to my configs as well, as they will definitely help me with my future debugging.) |