Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
December 24, 2022 11:18 pm GMT

Github Action Workflows for Perl Modules - Perl Club

Github Action workflows for Perl modules.

Github Action Workflows for Perl Modules - Perl Club

Although these Github Action workflows was created for the SPVM project of Perl Club, All Perl modules can use these without any changes.

Features

  • Supports Linux Ubuntu latest, Mac latest, Windows Server latest, Windows Server 2019
  • Supports 32bit on Linux/Ubuntu
  • Supports Perl 5.8.9 on Linux/Ubuntu
  • cpanm is downloaded in the workflow.
  • Resolves CPAN module dependencies.
  • ExtUtils::MakeMaker and make are used.
  • Each workflow is portable in all versions of Perl, Linux, Mac, Windows without setting environment variables

Download by Command

This Github Action workflows can be downloaded using commands.

mkdir -p .github/workflows# linux-ubuntu-latestcurl https://raw.githubusercontent.com/yuki-kimoto/SPVM/master/.github/workflows/linux-ubuntu-latest.yml > .github/workflows/linux-ubuntu-latest.yml# linux-ubuntu-latest-32bitcurl https://raw.githubusercontent.com/yuki-kimoto/SPVM/master/.github/workflows/linux-ubuntu-latest-32bit.yml > .github/workflows/linux-ubuntu-latest-32bit.yml# linux-ubuntu-latest-perl-5.8.9curl https://raw.githubusercontent.com/yuki-kimoto/SPVM/master/.github/workflows/linux-ubuntu-latest-perl-5.8.9.yml > .github/workflows/linux-ubuntu-latest-perl-5.8.9.yml# macos-latestcurl https://raw.githubusercontent.com/yuki-kimoto/SPVM/master/.github/workflows/macos-latest.yml > .github/workflows/macos-latest.yml# windows-latestcurl https://raw.githubusercontent.com/yuki-kimoto/SPVM/master/.github/workflows/windows-latest.yml > .github/workflows/windows-latest.yml# windows-2019curl https://raw.githubusercontent.com/yuki-kimoto/SPVM/master/.github/workflows/windows-2019.yml > .github/workflows/windows-2019.yml# Show Github Action workflowsls -l .github/workflows

Makefile.PL Example

An example of Makefile.PL. This is Makefile.PL that is generated by the spvmdist command.

use 5.008_007;use ExtUtils::MakeMaker;use strict;use warnings;use Config;use Getopt::Long 'GetOptions';GetOptions(  'meta' => \my $meta,);unless ($meta) {  # Do something such as environment check.}WriteMakefile(  NAME              => 'Foo',  VERSION_FROM      => 'lib/Foo.pm',  LICENSE           => 'perl_5',  ($] >= 5.005 ?     ## Add these new keywords supported since 5.005    (ABSTRACT_FROM  => 'lib/Foo.pm',     AUTHOR         => 'USER_NAME<USER_MAIL>') : ()),  test => {TESTS => 't/*.t t/*/*.t t/*/*/*.t'},  clean => {FILES => []},  META_MERGE => {    'meta-spec' => { version => 2 },    resources => {      repository => {        type => 'git',        url  => '',        web  => '',      },    },    no_index => {      directory => [],    }  },  NORECURS => 1,  CONFIGURE_REQUIRES => {  },  PREREQ_PM         => {  },  TEST_REQUIRES => {  },);1;

How to use this with Module::Build

Please replace ExtUtils::MakeMaker with Module::Build in the workflows.

And replace build process with the following command.

perl Build.PL./Build./Build disttest

Original Link: https://dev.to/yukikimoto/github-action-workflows-for-perl-modules-perl-club-kd5

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To