Skip to content

Commit d840630

Browse files
committed
Updated GitHub workflows from https://github.com/briandfoy/github_workflows
1ed301d9f8d14b3cac30c991599f754388eac205 * linux.yml upgraded: 20251210.001 -> 20260126.001 * macos.yml upgraded: 20250914.001 -> 20260126.001 * release.yml upgraded: 20250811.001 -> 20260105.001 * windows.yml upgraded: 20250811.001 -> 20260126.001
1 parent 7ff4893 commit d840630

File tree

4 files changed

+38
-69
lines changed

4 files changed

+38
-69
lines changed

.github/workflows/linux.yml

Lines changed: 28 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# brian's standard GitHub Actions Ubuntu config for Perl 5 modules
2-
# version 20251210.001
2+
# version 20260126.001
33
# https://github.com/briandfoy/github_workflows
44
# https://github.com/features/actions
55
# This file is licensed under the Artistic License 2.0
@@ -32,6 +32,7 @@ name: ubuntu
3232
# https://github.com/actions/checkout/issues/1590
3333
env:
3434
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
35+
PERL_LWP_SSL_VERIFY_HOSTNAME: 0
3536

3637
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-concurrency
3738
concurrency:
@@ -48,6 +49,7 @@ on:
4849
- '**'
4950
- '!**appveyor**'
5051
- '!**circleci**'
52+
- '!**freebsd**'
5153
- '!**macos**'
5254
- '!**notest**'
5355
- '!**release**'
@@ -74,7 +76,7 @@ on:
7476
pull_request:
7577
# weekly build on the master branch just to see what CPAN is doing
7678
schedule:
77-
- cron: "50 21 * * 1"
79+
- cron: "25 16 * * 2"
7880
jobs:
7981
perl:
8082
environment: automated_testing
@@ -83,15 +85,9 @@ jobs:
8385
matrix:
8486
os:
8587
- ubuntu-latest
86-
perl-version:
87-
- '5.30-bullseye'
88-
- '5.32-bullseye'
89-
- '5.34-bullseye'
90-
- '5.36-bookworm'
91-
- '5.38-bookworm'
92-
- 'latest'
88+
perl-version: [ 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42 ]
9389
container:
94-
image: perl:${{ matrix.perl-version }}
90+
image: ghcr.io/perlreview/5.${{ matrix.perl-version }}-modules-amd64
9591
steps:
9692
- uses: actions/checkout@v5
9793
- name: git corrections
@@ -100,89 +96,54 @@ jobs:
10096
- name: Platform check
10197
run: uname -a
10298
- name: setup platform
99+
if: vars.UBUNTU_EXTRA_APT_GET != ''
103100
run: |
104101
apt-get -y -o Acquire::Retries=5 update
105102
apt-get -y -o Acquire::Retries=5 upgrade
106-
apt-get -y -o Acquire::http::No-Cache=True -o Acquire::Retries=5 install \
107-
curl \
108-
jq \
109-
${{ vars.UBUNTU_EXTRA_APT_GET }}
110-
111-
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg --output /usr/share/keyrings/githubcli-archive-keyring.gpg
112-
chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
113-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
114-
apt -y -o Acquire::Retries=5 update
115-
apt-get -y -o Acquire::http::No-Cache=True -o Acquire::Retries=5 install gh
116-
117-
git config --global --add safe.directory $(pwd)
103+
apt-get -y -o Acquire::http::No-Cache=True -o Acquire::Retries=5 install ${{ vars.UBUNTU_EXTRA_APT_GET }}
118104
- name: Perl version check
119105
run: |
120106
perl -V
121107
perl -v | perl -0777 -ne 'm/(v5\.\d+)/ && print "PERL_VERSION=$1"' >> $GITHUB_ENV
122-
# Some older versions of Perl have trouble with hostnames in certs. I
123-
# haven't figured out why.
124-
- name: enhance environment
125-
run: |
126-
echo "PERL_LWP_SSL_VERIFY_HOSTNAME=0" >> $GITHUB_ENV
127-
# HTML::Tagset bumped its minimum version to v5.10 for no good reason
128-
# but this is a prereq to LWP, which runs on v5.8. To get around this,
129-
# download the tarball and fix it for v5.8. Install it before we try
130-
# to install things that depend on it. More recent versions will
131-
# install it normally.
132-
# 1. remove the META files which have references to v5.10 and ignore
133-
# the warnings
134-
# 2. fix Makefile.PL to remove two references to v5.10
135-
# https://github.com/libwww-perl/HTML-Tagset/pull/14
136-
- name: fix html-tagset for v5.8
137-
if: env.PERL_VERSION == 'v5.8'
138-
run: |
139-
cpan App::Cpan
140-
curl -L -O https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/HTML-Tagset-3.24.tar.gz
141-
tar -xzf HTML-Tagset-3.24.tar.gz
142-
cd HTML-Tagset-3.24
143-
rm META.*
144-
mv Makefile.PL Makefile.PL.orig
145-
perl -n -e 'next if /(^use 5)|(MIN_PERL)/; print' Makefile.PL.orig > Makefile.PL
146-
cpan -M http://www.cpan.org -T .
147-
cd ..
148-
pwd
149-
ls
150-
rm -rfv HTML-Tagset-*
151108
# Restore the last module installation for this OS/perl combination. This
152109
# saves several minutes in some cases. When cpan installs updates, the
153-
# 'save' counterpart for 'restore' will update the cache.
110+
# 'save' counterpart for 'restore' will update the cache. If this fails we
111+
# keep going, although the module installation will take longer
154112
- name: Restore Perl modules
155113
id: perl-modules-cache-restore
114+
continue-on-error: true
156115
uses: actions/cache/restore@v4
157116
with:
158117
key: ${{ runner.os }}-${{ matrix.perl-version }}-modules
159118
path: |
160119
/usr/local/lib/perl5
161120
/usr/local/bin/cover
162121
/usr/local/bin/cpan
163-
# We cannot reuse cache keys, so we'll delete it and then save it again
122+
# We cannot reuse a cache key that exists, so we'll delete it and then save it again
164123
# There are various hacks for this, but GitHub has so far declined to
165124
# do what so many people want. This seems like a long way to go to do
166125
# this, but most of the problem is translating the unique cache key name
167-
# to another hidden ID value. This is pervasive in the GitHub API.
126+
# to another hidden ID value. This is pervasive in the GitHub API. If we
127+
# fail this step, no big whoop. Outside pull requesters are likely to fail
128+
# this step since their token won't have permissions to the repo cache
168129
- name: Delete cache
130+
continue-on-error: true
169131
id: delete-cache
170132
env:
171133
GH_TOKEN: ${{ github.token }}
172134
run: |
173135
gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/${{ github.repository }}/actions/caches \
174136
| jq -r '.actions_caches[] | select(.key == "${{ steps.perl-modules-cache-restore.outputs.cache-primary-key }}") | .id' \
175137
| xargs -I{} gh api --method DELETE -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/${{ github.repository }}/actions/caches/{}
176-
# I had some problems with openssl on Ubuntu, so I punted by installing
177-
# cpanm first, which is easy. I can install IO::Socket::SSL with that,
178-
# then switch back to cpan. I didn't explore this further, but what you
179-
# see here hasn't caused problems for me.
180-
# Need HTTP::Tiny 0.055 or later.
181-
- name: Install cpanm and multiple modules
138+
# Most of the module stuff has moved into the images I created in GHCR
139+
- name: Install cpanm modules
140+
if: ( vars.EXTRA_CPANM_MODULES != '' || vars.UBUNTU_EXTRA_CPANM_MODULES != '' )
182141
run: |
183-
curl -L https://cpanmin.us | perl - App::cpanminus
184-
cpanm --notest IO::Socket::SSL LWP::Protocol::https App::Cpan HTTP::Tiny ExtUtils::MakeMaker Test::Manifest Test::More ${{ vars.EXTRA_CPANM_MODULES }} ${{ vars.UBUNTU_EXTRA_CPANM_MODULES }}
185-
cpan -M http://www.cpan.org -T Test::Manifest ${{ vars.EXTRA_CPAN_MODULES }}
142+
cpanm --notest ${{ vars.EXTRA_CPANM_MODULES }} ${{ vars.UBUNTU_EXTRA_CPANM_MODULES }}
143+
- name: Install cpan and multiple modules
144+
if: vars.EXTRA_CPAN_MODULES != ''
145+
run: |
146+
cpan -M http://www.cpan.org -T ${{ vars.EXTRA_CPAN_MODULES }}
186147
# Install the dependencies, again not testing them. This installs the
187148
# module in the current directory, so we end up installing the module,
188149
# but that's not a big deal.
@@ -201,7 +162,6 @@ jobs:
201162
- name: Author tests
202163
if: hashFiles('xt') != ''
203164
run: |
204-
cpanm --notest Test::CPAN::Changes
205165
prove -r -b xt
206166
# Running tests in parallel should be faster, but it's also more
207167
# tricky in cases where different tests share a feature, such as a
@@ -234,8 +194,11 @@ jobs:
234194
cpanm --notest Devel::Cover Devel::Cover::Report::Coveralls
235195
perl Makefile.PL
236196
cover -test +ignore 'Makefile.PL' -report coveralls
237-
# Now always save the Perl modules in case we updated some versions
197+
# Now always save the Perl modules in case we updated some versions. We'd like
198+
# this step to work, but if it doesn't, it's not a big deal. The always() captures
199+
# any work that we did even if something failed.
238200
- name: Save Perl modules
201+
continue-on-error: true
239202
id: perl-modules-cache-save
240203
uses: actions/cache/save@v4
241204
if: always()

.github/workflows/macos.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# brian's standard GitHub Actions macOS config for Perl 5 modules
2-
# version 20250914.001
2+
# version 20260126.001
33
# https://github.com/briandfoy/github_workflows
44
# https://github.com/features/actions
55
# This file is licensed under the Artistic License 2.0
@@ -45,6 +45,7 @@ on:
4545
- '**'
4646
- '!**appveyor**'
4747
- '!**circleci**'
48+
- '!**freebsd**'
4849
- '!**linux**'
4950
- '!**notest**'
5051
- '!**release**'
@@ -89,9 +90,11 @@ jobs:
8990
- name: Perl version check
9091
run: perl -V
9192
# reload the cache so we don't need to reinstall modules, This can save
92-
# several minutes.
93+
# several minutes. But, if this fails, don't kill the build. We'll have to
94+
# install
9395
- name: Load cache
9496
id: perl-modules-cache-restore
97+
continue-on-error: true
9598
uses: actions/cache/restore@v4
9699
with:
97100
key: ${{ runner.os }}-perl-modules
@@ -103,6 +106,7 @@ jobs:
103106
# do what so many people want
104107
- name: Delete cache
105108
id: delete-cache
109+
continue-on-error: true
106110
env:
107111
GH_TOKEN: ${{ github.token }}
108112
run: |
@@ -172,6 +176,7 @@ jobs:
172176
# Now always save the Perl modules in case we updated some versions
173177
- name: Save cache
174178
id: perl-modules-cache-save
179+
continue-on-error: true
175180
uses: actions/cache/save@v4
176181
if: always()
177182
with:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# brian's standard GitHub Actions release config for Perl 5 modules
2-
# version 20250811.001
2+
# version 20260105.001
33
# https://github.com/briandfoy/github_workflows
44
# https://github.com/features/actions
55
# This file is licensed under the Artistic License 2.0

.github/workflows/windows.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# brian's standard GitHub Actions Windows config for Perl 5 modules
2-
# version 20250811.001
2+
# version 20260126.001
33
# https://github.com/briandfoy/github_workflows
44
# https://github.com/features/actions
55
# This file is licensed under the Artistic License 2.0
@@ -39,6 +39,7 @@ on:
3939
- '**'
4040
- '!**appveyor**'
4141
- '!**circleci**'
42+
- '!**freebsd**'
4243
- '!**linux**'
4344
- '!**macos**'
4445
- '!**notest**'

0 commit comments

Comments
 (0)