Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use perl-actions/perl-versions to build perl-versions matrix #57

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 15 additions & 18 deletions .github/workflows/publish-to-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ on:
workflow_dispatch:

jobs:
prepare-matrix:
runs-on: ubuntu-latest
name: List perl versions
outputs:
perl-versions: ${{ steps.action.outputs.perl-versions }}
steps:
- name: Perl versions action step
id: action
uses: perl-actions/perl-versions@main
with:
since-perl: '5.8'
with-devel: 'true'

latest-build:
name: "Build latest"
Expand All @@ -29,28 +41,13 @@ jobs:
build:
name: "Build versions"
runs-on: ubuntu-latest
needs:
- prepare-matrix

strategy:
fail-fast: false
matrix:
perl-version:
- "devel"
- "5.38"
- "5.36"
- "5.34"
- "5.32"
- "5.30"
- "5.28"
- "5.26"
- "5.24"
- "5.22"
- "5.20"
- "5.18"
- "5.16"
- "5.14"
- "5.12"
- "5.10"
- "5.8"
perl-version: ${{ fromJson (needs.prepare-matrix.outputs.perl-versions) }}

steps:
- uses: actions/checkout@v4
Expand Down
34 changes: 16 additions & 18 deletions .github/workflows/test-cpanfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,29 @@ on:
- '*'
workflow_dispatch:
jobs:
prepare-matrix:
runs-on: ubuntu-latest
name: List perl versions
outputs:
perl-versions: ${{ steps.action.outputs.perl-versions }}
steps:
- name: Perl versions action step
id: action
uses: perl-actions/perl-versions@main
with:
since-perl: '5.8'
with-devel: 'true'

test-job:
runs-on: ubuntu-latest
needs:
- prepare-matrix
container:
image: perl:${{ matrix.perl-version }}-buster
strategy:
fail-fast: false
matrix:
perl-version:
- 'devel'
- '5.38'
- '5.36'
- '5.34'
- '5.32'
- '5.30'
- '5.28'
- '5.26'
- '5.24'
- '5.22'
- '5.20'
- '5.18'
- '5.16'
- '5.14'
- '5.12'
- '5.10'
- '5.8'
perl-version: ${{ fromJson (needs.prepare-matrix.outputs.perl-versions) }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the outputs include devel?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's controlled by argument with-devel (set to 'true`)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... there was missing needs parameter of jobs (therefor resulted into empty string)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is super cool!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not clear what s the output of the list when using with-level: true
is the string devel going to be added there or would a development version be added? like 5.39.1?
from the doc:

When set to true, returned list will also include current devel version of Perl, if available.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will include devel

name: Perl ${{ matrix.perl-version }}
steps:
- uses: actions/checkout@v4
Expand Down
Loading