-
Notifications
You must be signed in to change notification settings - Fork 1
122 lines (104 loc) · 3.26 KB
/
ci.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# DO NOT EDIT! This file is written by perl_setup_dist.
# If needed, you can add content at the end of the file.
name: Perl Tests
on:
push:
branches-ignore:
- 'exp-**'
- 'exp/**'
pull_request:
branches-ignore:
- 'exp-**'
- 'exp/**'
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos , windows]
perl: [ '5.26', '5.38' ]
exclude:
# MacOS runners are very expensive, so let’s run only on the latest Perl
- os: macos
perl: '5.26'
# From time to time, Strawberry Perl does not have the latest Perl
# version. So these lines can be uncommented to remove it (and replace
# it with another version in the include section below).
# Currently Strawberry Perl has 5.38
# - os: windows
# perl: '5.38'
# include:
# - os: windows
# perl: '5.32'
runs-on: ${{matrix.os}}-latest
name: Perl ${{matrix.perl}} ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Set up perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
distribution: ${{ ( matrix.os == 'windows' && 'strawberry' ) || 'default' }}
- name: Show Perl Version
run: |
perl -v
- name: Install Modules
run: |
cpanm -V
cpanm -v --installdeps --notest --with-configure --with-recommends --with-suggests --with-all-features .
- name: Install aspell
if: ${{ matrix.os == 'ubuntu' }}
run: |
sudo apt-get install aspell
- name: Run tests
if: ${{ matrix.os == 'ubuntu' }}
env:
AUTOMATED_TESTING: 1
NONINTERACTIVE_TESTING: 1
EXTENDED_TESTING: 1
RELEASE_TESTING: 1
run: |
perl Makefile.PL
make
make test
# MacOS runners are very costly, so let’s not run the EXTENDED_TESTING
# tests, to save some cost.
- name: Run tests
if: ${{ matrix.os == 'macos' }}
env:
AUTOMATED_TESTING: 1
NONINTERACTIVE_TESTING: 1
RELEASE_TESTING: 1
run: |
perl Makefile.PL
make
make test
# On Windows there is no 'make' command. It seems that Makefile.PL defaults
# to using 'dmake' which is maybe installed on the GitHub VMs. However we
# know that there is a 'gmake' included with Strawberry Perl, so let’s use
# that one.
- name: Run tests on Windows
if: ${{ matrix.os == 'windows' }}
env:
AUTOMATED_TESTING: 1
NONINTERACTIVE_TESTING: 1
RELEASE_TESTING: 1
run: |
perl Makefile.PL MAKE=gmake
gmake
gmake test
- name: Show Errors on Ubuntu
if: ${{ failure() && matrix.os == 'ubuntu' }}
run: |
cat /home/runner/.cpanm/work/*/build.log
- name: Show Errors on Windows
if: ${{ failure() && matrix.os == 'windows' }}
run: |
ls -l C:/Users/
ls -l C:/Users/RUNNER~1/
cat C:/Users/runneradmin/.cpanm/work/*/build.log
- name: Show Errors on OSX
if: ${{ failure() && matrix.os == 'macos' }}
run: |
cat /Users/runner/.cpanm/work/*/build.log
# End of the template. You can add custom content below this line.