Version 0.167 #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Explicit name of workflow. This is optional. | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#name | |
name: Perl CI | |
# Specify the events that trigger this workflow. | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on | |
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows | |
on: | |
push: | |
pull_request: | |
# Define the jobs that make up the workflow. | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobs | |
jobs: | |
# Define a job called 'test' | |
test: | |
# Create a matrix of configurations for the job. It will be run on | |
# the Cartesian product of the resources specified. | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategy | |
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs | |
strategy: | |
# Do not cancel other jobs in the matrix if one of them fails | |
fail-fast: false | |
# The actual matrix | |
matrix: | |
# OS environments under which the job runs. | |
runner: [ubuntu-latest, macos-latest, windows-latest] | |
# Version of Perl to run. This specifies the most-recent Perl 5. | |
perl: [ '5' ] | |
# Add minimum Perl versions, which differ among operating | |
# systems | |
include: | |
- runner: ubuntu-latest | |
# v5.10.1 is the earliest known to work | |
# This used to be 5.8.8, but the latest edition of HTML::Tagset (an | |
# indirect dependency) requires 5.10 | |
perl: '5.10.1' | |
- runner: macos-latest | |
# v5.10.1 is the earliest known to work | |
# This used to be 5.8.8, but the latest edition of HTML::Tagset (an | |
# indirect dependency) requires 5.10 | |
perl: '5.10.1' | |
- runner: windows-latest | |
# v5.26.8 is the earliest known to work | |
perl: '5.26.0' | |
# Define where the job runs. | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on | |
runs-on: ${{matrix.runner}} | |
# The name of this job | |
name: OS ${{matrix.runner}} Perl ${{matrix.perl}} | |
# The individual steps in the job | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up perl | |
# Specify the action performed by this step. In this case it is a | |
# custom action residing in repository shogo82148/actions-setup-perl | |
# and tagged v1. Yes, shogo82148 is the user name and | |
# actions-setup-perl is the repository name. See | |
# https://github.com/marketplace/actions/setup-perl-environment | |
# The available Perl versions are in | |
# https://github.com/shogo82148/actions-setup-perl/tree/main/versions | |
uses: shogo82148/actions-setup-perl@v1 | |
# Specify variables to the action | |
with: | |
perl-version: ${{ matrix.perl }} | |
distribution: ${{ ( startsWith( matrix.runner, 'windows-' ) && 'strawberry' ) || 'default' }} | |
- name: Show Perl Version | |
# Run a command to display the version of Perl being used. | |
run: | | |
perl -v | |
- name: Install support modules | |
continue-on-error: true | |
run: | | |
cpanm -v | |
cpanm File::HomeDir Getopt::Long version | |
- name: Customize environment | |
run: | | |
perl .github/workflows/tools environment | |
- name: Display local envoronment variables | |
run: | | |
echo MY_HOME=${{ env.MY_HOME }} | |
echo MY_IS_GITHUB_ACTION=${{ env.MY_IS_GITHUB_ACTION }} | |
echo MY_IS_UNIX=${{ env.MY_IS_UNIX }} | |
echo MY_IS_WINDOWS=${{ env.MY_IS_WINDOWS }} | |
echo MY_TOOLS=${{ env.MY_TOOLS }} | |
- name: Install module dependencies | |
run: | | |
perl ${{ env.MY_TOOLS }} install_podlators | |
cpanm Module::Build | |
cpanm --with-configure --notest --installdeps . | |
- name: Run ExtUtils::MakeMaker tests | |
run: | | |
perl Makefile.PL | |
perl ${{ env.MY_TOOLS }} --verbose make test | |
- name: Run Module::Build tests | |
run: | | |
perl Build.PL | |
./Build | |
./Build test | |
- name: Show cpanm install log on failure | |
if: failure() | |
run: perl ${{ env.MY_TOOLS }} show_log |