Github Actions for Perl Modules 2022-12-12 version.
- cpanm is downloaded in the github action.
- latest-perl and Perl 5.8.9
- 64bit and 32bit
- Ubuntu/Linux, Mac, Windows
This example is used in SPVM::Sys.
linux-ubuntu-latest
name: linux-ubuntu-latest
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: perl -V
- run: perl -MConfig -MData::Dumper -e 'local $Data::Dumper::Sortkeys = 1;warn Dumper \%Config;'
- run: perl -Mstrict -Mwarnings -MIO::Socket::INET -e 'my $socket = IO::Socket::INET->new(PeerAddr => qq(cpanmin.us), PeerPort => 80, Proto=> qq(tcp));print $socket qq(GET / HTTP/1.0\r\nHost:cpanmin.us\r\n\r\n);binmode STDOUT;print <$socket>;' | perl -p -0777 -e 'BEGIN { binmode STDOUT;binmode STDIN } s/.*?\r\n\r\n//s' > cpanm
- run: echo "PERL5LIB=$HOME/mylib/lib/perl5:$HOME/mylib/lib/perl5/"$(perl -MConfig -e 'print $Config{archname}') >> $GITHUB_ENV
- run: perl cpanm -v -n -L ~/mylib --installdeps . --configure-args="--no-build-spvm-modules"
- run: perl Makefile.PL
- run: make
- run: make disttest
linux-ubuntu-latest-32bit
name: linux-ubuntu-latest-32bit
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
container:
image: i386/ubuntu:latest
steps:
- run: |
apt update
apt install -y libperl-dev build-essential
- uses: actions/checkout@v1
- run: perl -V
- run: perl -MConfig -MData::Dumper -e 'local $Data::Dumper::Sortkeys = 1;warn Dumper \%Config;'
- run: perl -Mstrict -Mwarnings -MIO::Socket::INET -e 'my $socket = IO::Socket::INET->new(PeerAddr => qq(cpanmin.us), PeerPort => 80, Proto=> qq(tcp));print $socket qq(GET / HTTP/1.0\r\nHost:cpanmin.us\r\n\r\n);binmode STDOUT;print <$socket>;' | perl -p -0777 -e 'BEGIN { binmode STDOUT;binmode STDIN } s/.*?\r\n\r\n//s' > cpanm
- run: echo "PERL5LIB=$HOME/mylib/lib/perl5:$HOME/mylib/lib/perl5/"$(perl -MConfig -e 'print $Config{archname}') >> $GITHUB_ENV
- run: perl cpanm -v -n -L ~/mylib --installdeps . --configure-args="--no-build-spvm-modules"
- run: perl Makefile.PL
- run: make
- run: make disttest
linux-ubuntu-latest-perl-5.8.9
name: linux-ubuntu-latest-perl-5.8.9
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.8.9'
- run: perl -V
- run: perl -MConfig -MData::Dumper -e 'local $Data::Dumper::Sortkeys = 1;warn Dumper \%Config;'
- run: perl -Mstrict -Mwarnings -MIO::Socket::INET -e 'my $socket = IO::Socket::INET->new(PeerAddr => qq(cpanmin.us), PeerPort => 80, Proto=> qq(tcp));print $socket qq(GET / HTTP/1.0\r\nHost:cpanmin.us\r\n\r\n);binmode STDOUT;print <$socket>;' | perl -p -0777 -e 'BEGIN { binmode STDOUT;binmode STDIN } s/.*?\r\n\r\n//s' > cpanm
- run: echo "PERL5LIB=$HOME/mylib/lib/perl5:$HOME/mylib/lib/perl5/"$(perl -MConfig -e 'print $Config{archname}') >> $GITHUB_ENV
- run: perl cpanm -v -n -L ~/mylib --installdeps . --configure-args="--no-build-spvm-modules"
- run: perl Makefile.PL
- run: make
- run: make disttest
macos-latest
name: macos-latest
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- run: brew install perl
- run: perl -V
- run: perl -MConfig -MData::Dumper -e 'local $Data::Dumper::Sortkeys = 1;warn Dumper \%Config;'
- run: perl -Mstrict -Mwarnings -MIO::Socket::INET -e 'my $socket = IO::Socket::INET->new(PeerAddr => qq(cpanmin.us), PeerPort => 80, Proto=> qq(tcp));print $socket qq(GET / HTTP/1.0\r\nHost:cpanmin.us\r\n\r\n);binmode STDOUT;print <$socket>;' | perl -p -0777 -e 'BEGIN { binmode STDOUT;binmode STDIN } s/.*?\r\n\r\n//s' > cpanm
- run: echo "PERL5LIB=$HOME/mylib/lib/perl5:$HOME/mylib/lib/perl5/"$(perl -MConfig -e 'print $Config{archname}') >> $GITHUB_ENV
- run: perl cpanm -v -n -L ~/mylib --installdeps . --configure-args="--no-build-spvm-modules"
- run: perl Makefile.PL
- run: make
- run: make disttest
windows-latest
name: windows-latest
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
jobs:
perl:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- run: perl -V
- run: perl -MConfig -MData::Dumper -e 'local $Data::Dumper::Sortkeys = 1;warn Dumper \%Config;'
- run: perl -Mstrict -Mwarnings -MIO::Socket::INET -e 'my $socket = IO::Socket::INET->new(PeerAddr => qq(cpanmin.us), PeerPort => 80, Proto=> qq(tcp));print $socket qq(GET / HTTP/1.0\r\nHost:cpanmin.us\r\n\r\n);binmode STDOUT;print <$socket>;' | perl -p -0777 -e 'BEGIN { binmode STDOUT;binmode STDIN } s/.*?\r\n\r\n//s' > cpanm
- run: perl cpanm -v -n --installdeps . --configure-args="--no-build-spvm-modules"
- run: perl Makefile.PL
- run: gmake
- run: gmake disttest
Top comments (0)