diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7932697..25830d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,8 @@ jobs: - id: action uses: perl-actions/perl-versions@v2 with: - since-perl: 5.10 + # OpenStack::Client 1.0007 requires Perl 5.14, so older Perls can never pass. + since-perl: 5.14 with-devel: true linux: @@ -45,14 +46,17 @@ jobs: - uses: actions/checkout@v6 - name: perl -V run: perl -V + # cpm@v2 uses Node 24 (Node 20 is deprecated by GitHub). + # It auto-pins to the legacy cpm 0.998003 for Perl < 5.24, + # so older Perls still get a compatible cpm. - name: Install dependencies - uses: perl-actions/install-with-cpm@v1 + uses: perl-actions/install-with-cpm@v2 with: sudo: false global: false cpanfile: ".github/cpanfile" - name: Set PERL5LIB to local lib - run: echo "PERL5LIB=$(pwd)/local/lib/perl5" >> $GITHUB_ENV + run: echo "PERL5LIB=${{ github.workspace }}/local/lib/perl5" >> $GITHUB_ENV - name: Makefile.PL run: perl Makefile.PL - name: make test @@ -68,11 +72,18 @@ jobs: steps: - uses: actions/checkout@v6 + - uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: '5.40' - name: perl -V run: perl -V - name: Install dependencies - run: | - curl -fsSL --compressed https://git.io/cpm | perl - install -g --cpanfile .github/cpanfile + uses: perl-actions/install-with-cpm@v2 + with: + global: false + cpanfile: ".github/cpanfile" + - name: Set PERL5LIB to local lib + run: echo "PERL5LIB=${{ github.workspace }}/local/lib/perl5" >> $GITHUB_ENV - name: Makefile.PL run: perl Makefile.PL - name: make test @@ -88,14 +99,19 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Set up Perl - run: | - choco install strawberryperl - echo "C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin" >> $env:GITHUB_PATH + - uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: '5.40' + distribution: strawberry - name: perl -V run: perl -V - name: Install dependencies - run: cpanm --notest --installdeps . + uses: perl-actions/install-with-cpm@v2 + with: + global: false + cpanfile: ".github/cpanfile" + - name: Set PERL5LIB to local lib + run: echo "PERL5LIB=${{ github.workspace }}/local/lib/perl5" >> $GITHUB_ENV - name: Makefile.PL run: perl Makefile.PL - name: make test