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.

Feature…


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Yuki Kimoto - SPVM - 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-latest
curl https://raw.githubusercontent.com/yuki-kimoto/SPVM/master/.github/workflows/linux-ubuntu-latest.yml > .github/workflows/linux-ubuntu-latest.yml

# linux-ubuntu-latest-32bit
curl 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.9
curl 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-latest
curl https://raw.githubusercontent.com/yuki-kimoto/SPVM/master/.github/workflows/macos-latest.yml > .github/workflows/macos-latest.yml

# windows-latest
curl https://raw.githubusercontent.com/yuki-kimoto/SPVM/master/.github/workflows/windows-latest.yml > .github/workflows/windows-latest.yml

# windows-2019
curl https://raw.githubusercontent.com/yuki-kimoto/SPVM/master/.github/workflows/windows-2019.yml > .github/workflows/windows-2019.yml

# Show Github Action workflows
ls -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


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Yuki Kimoto - SPVM - Perl Club


Print Share Comment Cite Upload Translate Updates
APA

Yuki Kimoto - SPVM - Perl Club | Sciencx (2022-12-24T23:18:35+00:00) Github Action Workflows for Perl Modules – Perl Club. Retrieved from https://www.scien.cx/2022/12/24/github-action-workflows-for-perl-modules-perl-club/

MLA
" » Github Action Workflows for Perl Modules – Perl Club." Yuki Kimoto - SPVM - Perl Club | Sciencx - Saturday December 24, 2022, https://www.scien.cx/2022/12/24/github-action-workflows-for-perl-modules-perl-club/
HARVARD
Yuki Kimoto - SPVM - Perl Club | Sciencx Saturday December 24, 2022 » Github Action Workflows for Perl Modules – Perl Club., viewed ,<https://www.scien.cx/2022/12/24/github-action-workflows-for-perl-modules-perl-club/>
VANCOUVER
Yuki Kimoto - SPVM - Perl Club | Sciencx - » Github Action Workflows for Perl Modules – Perl Club. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/12/24/github-action-workflows-for-perl-modules-perl-club/
CHICAGO
" » Github Action Workflows for Perl Modules – Perl Club." Yuki Kimoto - SPVM - Perl Club | Sciencx - Accessed . https://www.scien.cx/2022/12/24/github-action-workflows-for-perl-modules-perl-club/
IEEE
" » Github Action Workflows for Perl Modules – Perl Club." Yuki Kimoto - SPVM - Perl Club | Sciencx [Online]. Available: https://www.scien.cx/2022/12/24/github-action-workflows-for-perl-modules-perl-club/. [Accessed: ]
rf:citation
» Github Action Workflows for Perl Modules – Perl Club | Yuki Kimoto - SPVM - Perl Club | Sciencx | https://www.scien.cx/2022/12/24/github-action-workflows-for-perl-modules-perl-club/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.