Skip to content

[github] update checkout/cache actions #69

[github] update checkout/cache actions

[github] update checkout/cache actions #69

Workflow file for this run

# vi: set ft=yaml:
name: "run tests"
on:
[push, pull_request]
jobs:
perl_tester:
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-latest"
- "macos-latest"
- "windows-latest"
perl-version: ["5.14", "5.16", "5.18", "5.20", "5.22", "5.24", "5.26", "5.28", "5.30", "5.32", "5.34", "5.36", "5.38"]
exclude:
- { os: windows-latest, perl-version: "5.18" }
- { os: windows-latest, perl-version: "5.20" }
- { os: windows-latest, perl-version: "5.22" }
- { os: windows-latest, perl-version: "5.24" }
- { os: windows-latest, perl-version: "5.26" }
- { os: windows-latest, perl-version: "5.38" }
runs-on: ${{ matrix.os }}
name: "perl v${{ matrix.perl-version }} on ${{ matrix.os }}"
env:
cachepan: cachepan
locallib: xlocal
steps:
- uses: actions/checkout@v4
- name: "Set up perl"
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl-version }}
- name: "Create perl fingerprint file"
run: perl -MConfig -wE 'say for sprintf(q{%vd}, $^V), Config::bincompat_options' > perl-fingerprint
- name: "Cache CPAN fragments"
uses: actions/cache@v4
with:
enableCrossOsArchive: true
path: ${{ env.cachepan }}
key: cpan-dists-${{ github.run_id }}
restore-keys: |
cpan-dists-
- name: "Cache local dependencies"
uses: actions/cache@v4
with:
path: ${{ env.locallib }}
key: xlocal-lib-${{ matrix.os }}-${{ hashFiles('perl-fingerprint', 'Makefile_PL_settings*.plx') }}
- name: "Activate local lib directory"
run: echo 'PERL5LIB=${{ github.workspace }}/${{ env.locallib }}/lib/perl5' >> $GITHUB_ENV
shell: bash
- run: cpanm --mirror "file://${{ github.workspace }}/${{ env.cachepan }}" --mirror https://www.cpan.org/ --save-dist "${{ github.workspace }}/${{ env.cachepan }}" -l "${{ env.locallib }}" --notest ExtUtils::MakeMaker
- run: cpanm --mirror "file://${{ github.workspace }}/${{ env.cachepan }}" --mirror https://www.cpan.org/ --save-dist "${{ github.workspace }}/${{ env.cachepan }}" -l "${{ env.locallib }}" --notest --installdeps --with-develop .
- run: perl Makefile.PL
- run: make test