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.)


In reply to Re: GitHub perl-ci.yml by pryrt
in thread GitHub perl-ci.yml by Bod

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.