Skip to content

Commit b0cb2f0

Browse files
oaldersclaude
andcommitted
workflow: install deps with setup-cpm + cpm install
Replace the perl-actions/install-with-cpm@v2 composite steps in the macOS and Windows jobs with an explicit perl-actions/setup-cpm@v1 (version: compat) step plus a cpm install run step. version: compat selects the right cpm release per Perl, so the hand-rolled matrix-conditional version pin is no longer needed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> workflow: install cpm in test_linux job via setup-cpm The perldocker/perl-tester images for older Perls (5.10-5.22) do not ship cpm on PATH, so the raw `cpm install -g` step failed with exit 127 on exactly those matrix cells. Add perl-actions/setup-cpm@v1 (version: compat) before the install step so cpm is provisioned on every Perl (compat pins 0.998003 for Perls <= 5.22). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent a9c6608 commit b0cb2f0

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

.github/workflows/build-and-test.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ jobs:
7474
with:
7575
name: build_dir
7676
path: .
77+
- uses: perl-actions/setup-cpm@v1
78+
with:
79+
version: compat
7780
- name: Install deps
7881
if: success()
7982
run: >
@@ -120,18 +123,17 @@ jobs:
120123
name: build_dir
121124
path: .
122125
- run: perl -V
123-
- name: install deps using cpanm
124-
uses: perl-actions/install-with-cpm@v2
126+
- uses: perl-actions/setup-cpm@v1
125127
with:
126-
cpanfile: "cpanfile"
127-
args: >
128-
--with-develop
129-
${{ steps.with-recommends.outputs.flag }}
130-
--with-suggests
131-
--with-test
132-
--mirror https://cpan.metacpan.org
133-
# App::cpm v0.999.0+ requires Perl 5.24+; pin older Perls to the last compatible release.
134-
version: ${{ matrix.perl-version <= '5.22' && '0.998003' || 'main' }}
128+
version: compat
129+
- name: install deps using cpanm
130+
run: >
131+
cpm install -g --cpanfile cpanfile
132+
--with-develop
133+
${{ steps.with-recommends.outputs.flag }}
134+
--with-suggests
135+
--with-test
136+
--mirror https://cpan.metacpan.org
135137
- run: prove -lr t
136138
env:
137139
AUTHOR_TESTING: 1
@@ -167,13 +169,11 @@ jobs:
167169
with:
168170
name: build_dir
169171
path: .
170-
- name: install deps using cpanm
171-
uses: perl-actions/install-with-cpm@v2
172+
- uses: perl-actions/setup-cpm@v1
172173
with:
173-
cpanfile: "cpanfile"
174-
args: "--mirror https://cpan.metacpan.org"
175-
# App::cpm v0.999.0+ requires Perl 5.24+; pin older Perls to the last compatible release.
176-
version: ${{ matrix.perl-version <= '5.22' && '0.998003' || 'main' }}
174+
version: compat
175+
- name: install deps using cpanm
176+
run: cpm install -g --cpanfile cpanfile --mirror https://cpan.metacpan.org
177177
- run: perl -V
178178
- run: prove -lr t
179179
env:

0 commit comments

Comments
 (0)