-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (44 loc) · 1.52 KB
/
linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
on: [push, pull_request]
name: Linux
jobs:
list:
name: list available perl versions
runs-on: 'ubuntu-latest'
steps:
- uses: shogo82148/actions-setup-perl@v1
- id: set-matrix
name: list available perl versions
shell: perl {0}
run: |
use Actions::Core;
# 5.12 is too old, 5.20 can't build Sub::Name in the Github environment for some reason
set_output(matrix => {perl => [grep { $_ !~ /^5.(6|8|10|12|20)\./ } perl_versions()]});
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
build:
runs-on: 'ubuntu-latest'
needs: list
strategy:
fail-fast: false
matrix: ${{fromJson(needs.list.outputs.matrix)}}
name: Perl ${{ matrix.perl }}
steps:
- name: check out code
uses: actions/checkout@v4
- name: switch to perl ${{ matrix.perl }}
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
- name: run tests
env:
PERL_USE_UNSAFE_INC: 0
run: |
perl -v
cpanm --force ExtUtils::MakeMaker || true
cpanm --force JSON::PP || true
cpanm JSON::PP ExtUtils::MakeMaker Test::Pod Test::Pod::Coverage || cat /home/runner/.cpanm/work/*/build.log
perl -Mparent -e0 || cpanm parent
rm -rf /home/runner/.cpanm/work/*
cpanm --installdeps . || cat /home/runner/.cpanm/work/*/build.log
perl Makefile.PL
make test TEST_VERBOSE=1