-
-
Notifications
You must be signed in to change notification settings - Fork 48
227 lines (227 loc) · 8.09 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
name: CI
on:
- push
- pull_request
jobs:
dist:
name: Make distribution using Dist::Inkt
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache ~/perl5
uses: actions/cache@v4
with:
key: ${{ runner.os }}-dist-locallib
path: ~/perl5
- name: Perl version
run: |
perl -v
- name: Install cpanm
run: |
curl -L https://cpanmin.us | perl - --sudo App::cpanminus
- name: Install local::lib
run: |
cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
- name: Install Dist::Inkt dependencies
shell: bash
run: |
eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
cpanm -n Try::Tiny LWP::UserAgent Data::Dump
- name: Install Dist::Inkt
shell: bash
run: |
eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
cpanm -n Dist::Inkt::Profile::TOBYINK
- name: Make distribution
shell: bash
run: |
eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
~/perl5/bin/distinkt-dist --TRAVIS --targetdir=build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: ./
inspect:
name: Inspect distribution
needs: dist
runs-on: ubuntu-latest
steps:
- name: Get dist artifact
uses: actions/download-artifact@v4
with:
name: dist
- name: Install dependencies
run: |
sudo apt install tree
- name: Tree
run: |
tree build
- name: Changes
run: cat build/Changes
- name: COPYRIGHT
run: cat build/COPYRIGHT
- name: CREDITS
run: cat build/CREDITS
- name: doap.ttl
run: cat build/doap.ttl
- name: Makefile.PL
run: cat build/Makefile.PL
- name: META.json
run: cat build/META.json
- name: META.yml
run: cat build/META.yml
test:
name: Perl ${{ matrix.perl }} ${{ matrix.os }} [thr=${{ matrix.threaded }}] ${{ matrix.joblabel }}
needs: dist
runs-on: ${{ ( ( matrix.os == 'strawberry') && 'windows-latest' ) || matrix.os }}
env:
GHA_TESTING_MODE: ${{ matrix.extended_testing }}
GHA_TESTING_COVER: ${{ matrix.coverage }}
GHA_INSTALL_EXTRAS: ${{ matrix.extra_dependencies }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-22.04', 'macos-13', 'windows-2022' ]
perl: [ '5.12', '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', '5.40' ]
coverage: [ false ]
threaded: [ true, false ]
extra_dependencies: [ true ]
extended_testing: [ 'extended' ]
exclude:
- { os: 'windows-latest', perl: '5.4' }
include:
- os: 'ubuntu-22.04'
perl: '5.40'
threaded: false
coverage: true
extra_dependencies: true
extended_testing: 'both'
joblabel: '(Coverage)'
# Legacy Perl on Ubuntu 22.04
- { os: 'ubuntu-22.04', perl: '5.8.1', threaded: false }
- { os: 'ubuntu-22.04', perl: '5.8.2', threaded: false }
- { os: 'ubuntu-22.04', perl: '5.8.3', threaded: false }
- { os: 'ubuntu-22.04', perl: '5.8.4', threaded: false }
- { os: 'ubuntu-22.04', perl: '5.8.5', threaded: false }
- { os: 'ubuntu-22.04', perl: '5.8.6', threaded: false }
- { os: 'ubuntu-22.04', perl: '5.8.7', threaded: false }
- { os: 'ubuntu-22.04', perl: '5.8.8', threaded: false }
- { os: 'ubuntu-22.04', perl: '5.8.9', threaded: false }
- { os: 'ubuntu-22.04', perl: '5.10.0', threaded: false }
- { os: 'ubuntu-22.04', perl: '5.10.1', threaded: false }
# Modern Perl on Ubuntu 24.04
- { os: 'ubuntu-24.04', perl: '5.40', threaded: true }
- { os: 'ubuntu-24.04', perl: '5.40', threaded: false }
# Modern Perl on Mac OS 14(M1)
- { os: 'macos-14', perl: '5.40', threaded: true }
- { os: 'macos-14', perl: '5.40', threaded: false }
# Strawberry Perl on Windows
- { os: 'strawberry', perl: '5.32', threaded: true }
steps:
- name: Get dist artifact
uses: actions/download-artifact@v4
with:
name: dist
- name: Set up perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
multi-thread: ${{ matrix.threaded }}
distribution: ${{ ( ( matrix.os == 'strawberry') && 'strawberry' ) || 'default' }}
- name: Perl version
run: |
perl -v
- name: Install dependencies
run: |
cpanm -n App::GhaProve
cpanm -n --installdeps ./build
- name: Install extra dependencies
if: matrix.extra_dependencies || matrix.coverage
run: cpanm -n --installdeps --with-recommends --with-suggests ./build || true
- name: Install coverage dependencies
if: matrix.coverage
run: |
cpanm -n Devel::Cover
cpanm -n Devel::Cover::Report::Coveralls
cpanm -n Devel::Cover::Report::Codecov
cpanm -n 'https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/Devel-Cover-Report-Codecov-Service-GithubActions-0.001001.tar.gz'
- name: Configure
working-directory: ./build/
run: perl Makefile.PL
- name: Make
working-directory: ./build/
run: perl -MConfig -e'exec $Config{make}'
- name: Clean coverage data
if: matrix.coverage
working-directory: ./build/
run: cover -delete
- name: Install optional deps for better test coverage
if: matrix.coverage
run: |
cpanm -n match::simple
cpanm -n Alt::Lexical::Var::ButSupportModernPerl
cpanm -n Class::InsideOut
cpanm -n Data::Constraint
cpanm -n Devel::Hide Devel::Refcount
cpanm -n Function::Parameters
cpanm -n IO::String
cpanm -n Kavorka
cpanm -n Moops
cpanm -n MooseX::Getopt
cpanm -n MooseX::Types MooseX::Types::Common
cpanm -n MooX::TypeTiny
cpanm -n MouseX::Types MouseX::Types::Common
cpanm -n Object::Accessor
cpanm -n Return::Type
cpanm -n Specio
cpanm -n Switcheroo
cpanm -n Validate::Simple
cpanm -n Validation::Class
- name: Test suite (No XS, LaxNum)
working-directory: ./build/
env:
PERL_ONLY: 1
PERL_TYPE_TINY_XS: 0
PERL_TYPES_STANDARD_STRICTNUM: 0
run: gha-prove -Iinc -b -r t
- name: Test suite (No XS, StrictNum)
working-directory: ./build/
env:
PERL_ONLY: 1
PERL_TYPE_TINY_XS: 0
PERL_TYPES_STANDARD_STRICTNUM: 1
run: gha-prove -Iinc -b -r t
- name: Install Type::Tiny::XS
if: runner.os != 'Windows'
shell: bash
run: cpanm Type::Tiny::XS || echo 1
- name: Test suite (XS, LaxNum)
if: runner.os != 'Windows'
working-directory: ./build/
env:
PERL_ONLY: 0
PERL_TYPE_TINY_XS: 1
PERL_TYPES_STANDARD_STRICTNUM: 0
run: gha-prove -Iinc -b -r t
- name: Test suite (XS, StrictNum)
if: runner.os != 'Windows'
working-directory: ./build/
env:
PERL_ONLY: 0
PERL_TYPE_TINY_XS: 1
PERL_TYPES_STANDARD_STRICTNUM: 1
run: gha-prove -Iinc -b -r t
- name: Coveralls.io report
if: success() && matrix.coverage
working-directory: ./build/
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
run: cover -select_re '^blib/lib/' -report coveralls
- name: Codecov.io report
if: success() && matrix.coverage
working-directory: ./build/
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: cover -select_re '^blib/lib/' -report codecov