shogo82148 / actions-setup-perl Goto Github PK
View Code? Open in Web Editor NEWSetup Perl environment Action
Home Page: https://github.com/marketplace/actions/setup-perl-environment
License: MIT License
Setup Perl environment Action
Home Page: https://github.com/marketplace/actions/setup-perl-environment
License: MIT License
Wed, 28 Oct 2020 00:59:33 GMT
Run shogo82148/actions-setup-perl@v1
Wed, 28 Oct 2020 00:59:33 GMT
##[debug]isExplicit: 5.28.3
Wed, 28 Oct 2020 00:59:33 GMT
##[debug]explicit? true
Wed, 28 Oct 2020 00:59:33 GMT
##[debug]checking cache: C:\hostedtoolcache\windows\perl\5.28.3\x64
Wed, 28 Oct 2020 00:59:33 GMT
##[debug]not found
Wed, 28 Oct 2020 00:59:33 GMT
##[debug]Downloading https://shogo82148-actions-setup-perl.s3.amazonaws.com/v1.7.3/perl-5.28.3-win32-x64.tar.xz
Wed, 28 Oct 2020 00:59:33 GMT
##[debug]Destination D:\a\_temp\2a8824be-8c43-4a7a-ad18-6219bf11101b
Wed, 28 Oct 2020 00:59:34 GMT
##[debug]download complete
Wed, 28 Oct 2020 00:59:34 GMT
##[debug]Checking tar --version
Wed, 28 Oct 2020 00:59:34 GMT
##[debug]bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.5.f-ipp
Wed, 28 Oct 2020 00:59:34 GMT
C:\windows\system32\tar.exe xJ -v -C D:\a\_temp\aaa92fe1-f9ce-48ec-91d4-1dbc3d6bab5b -f D:\a\_temp\2a8824be-8c43-4a7a-ad18-6219bf11101b
Wed, 28 Oct 2020 01:17:25 GMT
##[debug]Re-evaluate condition on job cancellation for step: 'Setup perl'.
Wed, 28 Oct 2020 01:17:25 GMT
Error: The operation was canceled.
Wed, 28 Oct 2020 01:17:25 GMT
##[debug]System.OperationCanceledException: The operation was canceled.
Wed, 28 Oct 2020 01:17:25 GMT
##[debug] at System.Threading.CancellationToken.ThrowOperationCanceledException()
Wed, 28 Oct 2020 01:17:25 GMT
##[debug] at GitHub.Runner.Sdk.ProcessInvoker.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Channel`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
Wed, 28 Oct 2020 01:17:25 GMT
##[debug] at GitHub.Runner.Common.ProcessInvokerWrapper.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Channel`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
Wed, 28 Oct 2020 01:17:25 GMT
##[debug] at GitHub.Runner.Worker.Handlers.DefaultStepHost.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Boolean inheritConsoleHandler, CancellationToken cancellationToken)
Wed, 28 Oct 2020 01:17:25 GMT
##[debug] at GitHub.Runner.Worker.Handlers.NodeScriptActionHandler.RunAsync(ActionRunStage stage)
Wed, 28 Oct 2020 01:17:25 GMT
##[debug] at GitHub.Runner.Worker.ActionRunner.RunAsync()
Wed, 28 Oct 2020 01:17:25 GMT
##[debug] at GitHub.Runner.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)
Wed, 28 Oct 2020 01:17:25 GMT
##[debug]Finishing: Setup perl
Tried turning tests for 5.8, 5.10, and 5.12 on Windows again in /theory/semver@8bfa9f8, but alas, it failed with "Error: unable to get latest version". Are the binaries missing?
Originally posted by @theory in #225 (comment)
Hi, how do I specify using a perl version with multithreading?
Would be really nice to have support for those.
Yes, I know cpanm
doesn't work on Perl older than 5.8.1, so the classic CPAN client would need to be used there.
Is the intention of #501 to add general support for building with Perl 5.6?
Tried it out with the Linux workflow file for Archive-Zip-SimpleZip but it didn't work -- see here for the build failure
The call to cpanm --quiet --installdeps --notest .
in .linux.yml didn't install any of the expected dependencies.
Net::SSLeay
could not find OpenSSL on Windows. https://github.com/shogo82148/Redis-Fast/pull/97/checks?check_run_id=1337690894
2020-11-01T06:05:07.9624492Z ##[debug]Dropping file value 'D:\a\Redis-Fast\Redis-Fast\Makefile.PL'. Path does not exist
2020-11-01T06:05:07.9626287Z ##[error]2020-11-01T06:02:38,3944,Net-SSLeay-1.88| Use of uninitialized value $exec in -x at Makefile.PL line 108.
2020-11-01T06:05:07.9632914Z 2020-11-01T06:02:38,3944,Net-SSLeay-1.88| *** Could not find OpenSSL
2020-11-01T06:05:07.9634008Z 2020-11-01T06:02:38,3944,Net-SSLeay-1.88| If it's already installed, please set the OPENSSL_PREFIX environment
2020-11-01T06:05:07.9635032Z 2020-11-01T06:02:38,3944,Net-SSLeay-1.88| variable accordingly. If it isn't installed yet, get the latest version
2020-11-01T06:05:07.9635787Z 2020-11-01T06:02:38,3944,Net-SSLeay-1.88| from http://www.openssl.org/.
2020-11-01T06:05:07.9636485Z 2020-11-01T06:02:38,3944,Net-SSLeay-1.88| ! Retrying (you can turn off this behavior by --no-retry)
2020-11-01T06:05:07.9637231Z 2020-11-01T06:02:38,3944,Net-SSLeay-1.88| Executing C:\hostedtoolcache\windows\perl\5.32.0\x64\bin\perl.exe Makefile.PL
2020-11-01T06:05:07.9637920Z 2020-11-01T06:02:38,3944,Net-SSLeay-1.88| Do you want to run external tests?
2020-11-01T06:05:07.9638829Z 2020-11-01T06:02:38,3944,Net-SSLeay-1.88| These tests *will* *fail* if you do not have network connectivity. [n] n
2020-11-01T06:05:07.9639489Z 2020-11-01T06:02:38,3944,Net-SSLeay-1.88| Warning: NAME must be a package name
2020-11-01T06:05:07.9640058Z 2020-11-01T06:02:38,3944,Net-SSLeay-1.88| Checking if your kit is complete...
2020-11-01T06:05:07.9640536Z 2020-11-01T06:02:38,3944,Net-SSLeay-1.88| Looks good
TLS/SSL is now very common function in 2020. It should be easier to use.
Actually, Strawberry Perl has pre-installed modules related TLS/SSL.
workflow file:
name: test
on:
push:
branches:
- '*'
jobs:
build:
runs-on: macOS-latest
strategy:
matrix:
perl-version:
- '5.16'
steps:
- uses: actions/checkout@v2
- uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl-version }}
- run: perl -MNet::SSLeay -e1
error output:
Run perl -MNet::SSLeay -e1
Can't load '/Users/runner/hostedtoolcache/perl/5.16.3/x64/lib/site_perl/5.16.3/darwin-2level/auto/Net/SSLeay/SSLeay.bundle' for module Net::SSLeay: dlopen(/Users/runner/hostedtoolcache/perl/5.16.3/x64/lib/site_perl/5.16.3/darwin-2level/auto/Net/SSLeay/SSLeay.bundle, 1): Library not loaded: /usr/local/opt/[email protected]/lib/libssl.1.0.0.dylib
Referenced from: /Users/runner/hostedtoolcache/perl/5.16.3/x64/lib/site_perl/5.16.3/darwin-2level/auto/Net/SSLeay/SSLeay.bundle
Error: Reason: image not found at /Users/runner/hostedtoolcache/perl/5.16.3/x64/lib/5.16.3/darwin-2level/DynaLoader.pm line 194.
at -e line 0.
Compilation failed in require.
BEGIN failed--compilation aborted.
Error: Process completed with exit code 2.
full log
https://github.com/skaji/github-actions-playground/runs/1573027737
It seems that the code for the PERLLIB logic is assuming that the path is going to be __dirname something which causes the path to be built up badly:
Can't locate strict.pm in @inc (you may need to install the strict module) (@inc contains: /home/runner/_work/_actions/shogo82148/actions-setup-perl/v1/scripts/lib /opt/hostedtoolcache/perl/5.32.1/x64/lib/site_perl/5.32.1/x86_64-linux /opt/hostedtoolcache/perl/5.32.1/x64/lib/site_perl/5.32.1 /opt/hostedtoolcache/perl/5.32.1/x64/lib/5.32.1/x86_64-linux /opt/hostedtoolcache/perl/5.32.1/x64/lib/5.32.1)
When on a self-hosted runner the hostedtool cache folder is going to be /home/runner/_work/_tool/perl/... instead of /opt...
https://github.com/shogo82148/actions-setup-perl/pull/454/checks?check_run_id=1437586487#step:9:3163
xcopy /f /r /i /d /y ..\\*.h ..\lib\CORE\\*.*
0 File(s) copied
..\miniperl.exe -I..\lib -I..\cpan\Cwd -I..\cpan\Cwd\lib buildext.pl "gmake" ..\lib\CORE\libperl510.a ..\ext --static
DynaLoader.pm loaded (..\lib ..\cpan\Cwd ..\cpan\Cwd\lib D:/a/_temp/build-perl-6712/perl-5.10.0/lib ., C:\MinGW\lib)
DynaLoader not linked into this perl
D:\a\_temp\build-perl-6712\perl-5.10.0\win32\..\miniperl.exe D:\a\_temp\build-perl-6712\perl-5.10.0\win32\..\win32\bin\pl2bat.pl D:\a\_temp\build-perl-6712\perl-5.10.0\win32\..\win32\bin\pl2bat.pl
gmake: *** [GNUmakefile:871: Extensions_static] Error -1073741819
Error: failed to execute gmake -f GNUmakefile install INST_TOP=C:\hostedtoolcache\windows\perl\5.10.0\x64 CCHOME=C:\MinGW -j 1: exit code 512 at D:/a/actions-setup-perl/actions-setup-perl/scripts/windows/../lib/Actions/Core.pm line 126.
I'm trying to use actions-setup-perl to check B::COW and Clone on macOS and Windows
Here is the error I can see during make
No rule to make target 'C:\hostedtoolcache\windows\perl\5.22.4\x64\lib\CORE\libperl522.a',
I wonder if all environment variables are set correctly, it seems that libperl is not found?
This does not happen with Perl 5.24 and later. I do not think it s something wrong with the Makefile.
Would appreciate any help/advice to fix this issue
more details from: https://github.com/atoomic/B-COW/runs/656765595?check_suite_focus=true
> make
cp lib/B/COW.pm blib\lib\B\COW.pm
Running Mkbootstrap for B::COW ()
"C:\hostedtoolcache\windows\perl\5.22.4\x64\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "COW.bs"
"C:\hostedtoolcache\windows\perl\5.22.4\x64\bin\perl.exe" "C:\hostedtoolcache\windows\perl\5.22.4\x64\lib\ExtUtils/xsubpp" -typemap "C:\hostedtoolcache\windows\perl\5.22.4\x64\lib\ExtUtils\typemap" COW.xs > COW.xsc && "C:\hostedtoolcache\windows\perl\5.22.4\x64\bin\perl.exe" -MExtUtils::Command -e mv -- COW.xsc COW.c
Please specify prototyping behavior for COW.xs (see perlxs manual)
gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"0.004\" -DXS_VERSION=\"0.004\" "-IC:\hostedtoolcache\windows\perl\5.22.4\x64\lib\CORE" COW.c
"C:\hostedtoolcache\windows\perl\5.22.4\x64\bin\perl.exe" -MExtUtils::Mksymlists \
-e "Mksymlists('NAME'=>\"B::COW\", 'DLBASE' => 'COW', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
mingw32-make: *** No rule to make target 'C:\hostedtoolcache\windows\perl\5.22.4\x64\lib\CORE\libperl522.a', needed by 'blib\arch\auto\B\COW\COW.dll'. Stop.
##[error]Process completed with exit code 1.
https://github.com/shogo82148/actions-setup-perl/runs/1437586441?check_suite_focus=true#step:9:4254
perlmain.o .\perlexe.res ..\lib\CORE\libperl512.a -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
copy ..\perl.exe ..\wperl.exe
1 file(s) copied.
..\miniperl.exe -I..\lib bin\exetype.pl ..\wperl.exe WINDOWS
'x' outside of string in unpack at bin\exetype.pl line 39.
gmake: *** [GNUmakefile:792: ..\perl.exe] Error 255
Error: failed to execute gmake -f GNUmakefile install INST_TOP=C:\hostedtoolcache\windows\perl\5.12.5\x64 CCHOME=C:\MinGW -j 1: exit code 512 at D:/a/actions-setup-perl/actions-setup-perl/scripts/windows/../lib/Actions/Core.pm line 126.
I assume shogo82148/actions-setup-perl now contains IO::Socket::SSL by default,
but it seems that we cannot require it on windows.
Minimal example:
name: test
on:
push:
branches:
- '*'
jobs:
build:
runs-on: windows-latest
steps:
- uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.14'
- run: perl -MIO::Socket::SSL -e1
and its output:
https://github.com/skaji/github-actions-playground/runs/1430628950?check_suite_focus=true
2020-11-20T12:01:21.4440637Z ##[group]Run perl -MIO::Socket::SSL -e1
2020-11-20T12:01:21.4441480Z �[36;1mperl -MIO::Socket::SSL -e1�[0m
2020-11-20T12:01:21.4529565Z shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
2020-11-20T12:01:21.4530122Z env:
2020-11-20T12:01:21.4531711Z PERL5LIB: D:\a\_actions\shogo82148\actions-setup-perl\v1\scripts\lib
2020-11-20T12:01:21.4532324Z ##[endgroup]
2020-11-20T12:01:26.6244178Z ##[error]Process completed with exit code 1.
Using:
- name: Setup Perl environment
uses: shogo82148/[email protected]
with:
perl-version: 5.32.1
install-modules-with: cpm
install-modules:
Devel::Cover
Devel::Cover::Report::Coveralls
# Features and Devel modules
install-modules-args: >
--with-develop
--feature=starman
--feature=latex-pdf-ps
--feature=openoffice
--feature=xls
--feature=edi
generates:
/opt/hostedtoolcache/perl/5.32.1/x64/bin/perl /home/runner/work/_actions/shogo82148/actions-setup-perl/v1/bin/cpm install --show-build-log-on-failure --with-develop --feature=starman --feature=latex-pdf-ps --feature=openoffice --feature=xls --feature=edi
All requirements are satisfied.
/opt/hostedtoolcache/perl/5.32.1/x64/bin/perl /home/runner/work/_actions/shogo82148/actions-setup-perl/v1/bin/cpm install --show-build-log-on-failure --with-develop --feature=starman --feature=latex-pdf-ps --feature=openoffice --feature=xls --feature=edi Devel::Cover Devel::Cover::Report::Coveralls
FAIL resolve Devel::Cover Devel::Cover::Report::Coveralls
0 distribution installed.
2021-05-18T05:44:23,6438| Running cpm 0.997003 (/home/runner/work/_actions/shogo82148/actions-setup-perl/v1/bin/cpm) on perl 5.32.1 built for x86_64-linux (/opt/hostedtoolcache/perl/5.32.1/x64/bin/perl)
2021-05-18T05:44:23,6438| Command line arguments are: install --show-build-log-on-failure --with-develop --feature=starman --feature=latex-pdf-ps --feature=openoffice --feature=xls --feature=edi Devel::Cover Devel::Cover::Report::Coveralls
2021-05-18T05:44:23,6438| Work directory is /home/runner/.perl-cpm/work/1621316663.6438
2021-05-18T05:44:23,6438| You have make /usr/bin/make
2021-05-18T05:44:23,6438| You have HTTP::Tiny 0.076
2021-05-18T05:44:23,6438| You have tar /usr/bin/tar
2021-05-18T05:44:23,6438| You have unzip /usr/bin/unzip
2021-05-18T05:44:23,6438| Setup local::lib /home/runner/work/LedgerSMB/LedgerSMB/local
2021-05-18T05:44:23,6438| --
2021-05-18T05:44:23,6438| Summary of my perl5 (revision 5 version 32 subversion 1) configuration:
2021-05-18T05:44:23,6438|
2021-05-18T05:44:23,6438| Platform:
2021-05-18T05:44:23,6438| osname=linux
2021-05-18T05:44:23,6438| osvers=5.4.0-1047-azure
2021-05-18T05:44:23,6438| archname=x86_64-linux
2021-05-18T05:44:23,6438| uname='linux fv-az184-581 5.4.0-1047-azure #49~18.04.1-ubuntu smp thu apr 22 21:28:54 utc 2021 x86_64 x86_64 x86_64 gnulinux '
2021-05-18T05:44:23,6438| config_args='-Dprefix=/opt/hostedtoolcache/perl/5.32.1/x64 -de -Dman1dir=none -Dman3dir=none -A'eval:scriptdir=/opt/hostedtoolcache/perl/5.32.1/x64/bin''
2021-05-18T05:44:23,6438| hint=recommended
2021-05-18T05:44:23,6438| useposix=true
2021-05-18T05:44:23,6438| d_sigaction=define
2021-05-18T05:44:23,6438| useithreads=undef
2021-05-18T05:44:23,6438| usemultiplicity=undef
2021-05-18T05:44:23,6438| use64bitint=define
2021-05-18T05:44:23,6438| use64bitall=define
2021-05-18T05:44:23,6438| uselongdouble=undef
2021-05-18T05:44:23,6438| usemymalloc=n
2021-05-18T05:44:23,6438| default_inc_excludes_dot=define
2021-05-18T05:44:23,6438| bincompat5005=undef
2021-05-18T05:44:23,6438| Compiler:
2021-05-18T05:44:23,6438| cc='cc'
2021-05-18T05:44:23,6438| ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
2021-05-18T05:44:23,6438| optimize='-O2'
2021-05-18T05:44:23,6438| cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
2021-05-18T05:44:23,6438| ccversion=''
2021-05-18T05:44:23,6438| gccversion='7.5.0'
2021-05-18T05:44:23,6438| gccosandvers=''
2021-05-18T05:44:23,6438| intsize=4
2021-05-18T05:44:23,6438| longsize=8
2021-05-18T05:44:23,6438| ptrsize=8
2021-05-18T05:44:23,6438| doublesize=8
2021-05-18T05:44:23,6438| byteorder=12345678
2021-05-18T05:44:23,6438| doublekind=3
2021-05-18T05:44:23,6438| d_longlong=define
2021-05-18T05:44:23,6438| longlongsize=8
2021-05-18T05:44:23,6438| d_longdbl=define
2021-05-18T05:44:23,6438| longdblsize=16
2021-05-18T05:44:23,6438| longdblkind=3
2021-05-18T05:44:23,6438| ivtype='long'
2021-05-18T05:44:23,6438| ivsize=8
2021-05-18T05:44:23,6438| nvtype='double'
2021-05-18T05:44:23,6438| nvsize=8
2021-05-18T05:44:23,6438| Off_t='off_t'
2021-05-18T05:44:23,6438| lseeksize=8
2021-05-18T05:44:23,6438| alignbytes=8
2021-05-18T05:44:23,6438| prototype=define
2021-05-18T05:44:23,6438| Linker and Libraries:
2021-05-18T05:44:23,6438| ld='cc'
2021-05-18T05:44:23,6438| ldflags =' -fstack-protector-strong -L/usr/local/lib'
2021-05-18T05:44:23,6438| libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
2021-05-18T05:44:23,6438| libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
2021-05-18T05:44:23,6438| perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
2021-05-18T05:44:23,6438| libc=libc-2.27.so
2021-05-18T05:44:23,6438| so=so
2021-05-18T05:44:23,6438| useshrplib=false
2021-05-18T05:44:23,6438| libperl=libperl.a
2021-05-18T05:44:23,6438| gnulibc_version='2.27'
2021-05-18T05:44:23,6438| Dynamic Linking:
2021-05-18T05:44:23,6438| dlsrc=dl_dlopen.xs
2021-05-18T05:44:23,6438| dlext=so
2021-05-18T05:44:23,6438| d_dlsymun=undef
2021-05-18T05:44:23,6438| ccdlflags='-Wl,-E'
2021-05-18T05:44:23,6438| cccdlflags='-fPIC'
2021-05-18T05:44:23,6438| lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'
2021-05-18T05:44:23,6438| Characteristics of this binary (from libperl):
2021-05-18T05:44:23,6438| Compile-time options:
2021-05-18T05:44:23,6438| HAS_TIMES
2021-05-18T05:44:23,6438| PERLIO_LAYERS
2021-05-18T05:44:23,6438| PERL_COPY_ON_WRITE
2021-05-18T05:44:23,6438| PERL_DONT_CREATE_GVSV
2021-05-18T05:44:23,6438| PERL_MALLOC_WRAP
2021-05-18T05:44:23,6438| PERL_OP_PARENT
2021-05-18T05:44:23,6438| PERL_PRESERVE_IVUV
2021-05-18T05:44:23,6438| USE_64_BIT_ALL
2021-05-18T05:44:23,6438| USE_64_BIT_INT
2021-05-18T05:44:23,6438| USE_LARGE_FILES
2021-05-18T05:44:23,6438| USE_LOCALE
2021-05-18T05:44:23,6438| USE_LOCALE_COLLATE
2021-05-18T05:44:23,6438| USE_LOCALE_CTYPE
2021-05-18T05:44:23,6438| USE_LOCALE_NUMERIC
2021-05-18T05:44:23,6438| USE_LOCALE_TIME
2021-05-18T05:44:23,6438| USE_PERLIO
2021-05-18T05:44:23,6438| USE_PERL_ATOF
2021-05-18T05:44:23,6438| Locally applied patches:
2021-05-18T05:44:23,6438| Devel::PatchPerl 2.08
2021-05-18T05:44:23,6438| shogo82148/actions-setup-perl 1.12.0
2021-05-18T05:44:23,6438| Built under linux
2021-05-18T05:44:23,6438| Compiled at May 16 2021 07:27:56
2021-05-18T05:44:23,6438| %ENV:
2021-05-18T05:44:23,6438| PERL5LIB="/home/runner/work/LedgerSMB/LedgerSMB/local/lib/perl5:/home/runner/work/_actions/shogo82148/actions-setup-perl/v1/scripts/lib"
2021-05-18T05:44:23,6438| PERL_LOCAL_LIB_ROOT="/home/runner/work/LedgerSMB/LedgerSMB/local"
2021-05-18T05:44:23,6438| PERL_MB_OPT="--install_base "/home/runner/work/LedgerSMB/LedgerSMB/local""
2021-05-18T05:44:23,6438| PERL_MM_OPT="INSTALL_BASE=/home/runner/work/LedgerSMB/LedgerSMB/local"
2021-05-18T05:44:23,6438| @INC:
2021-05-18T05:44:23,6438| /home/runner/work/LedgerSMB/LedgerSMB/local/lib/perl5/5.32.1/x86_64-linux
2021-05-18T05:44:23,6438| /home/runner/work/LedgerSMB/LedgerSMB/local/lib/perl5/5.32.1
2021-05-18T05:44:23,6438| /home/runner/work/LedgerSMB/LedgerSMB/local/lib/perl5/x86_64-linux
2021-05-18T05:44:23,6438| /home/runner/work/LedgerSMB/LedgerSMB/local/lib/perl5
2021-05-18T05:44:23,6438| /home/runner/work/_actions/shogo82148/actions-setup-perl/v1/scripts/lib
2021-05-18T05:44:23,6438| /opt/hostedtoolcache/perl/5.32.1/x64/lib/site_perl/5.32.1/x86_64-linux
2021-05-18T05:44:23,6438| /opt/hostedtoolcache/perl/5.32.1/x64/lib/site_perl/5.32.1
2021-05-18T05:44:23,6438| /opt/hostedtoolcache/perl/5.32.1/x64/lib/5.32.1/x86_64-linux
2021-05-18T05:44:23,6438| /opt/hostedtoolcache/perl/5.32.1/x64/lib/5.32.1
2021-05-18T05:44:23,6438| --
2021-05-18T05:44:23,6454,Devel::Cover Devel::Cover::Report::Coveralls| MetaCPAN, skip, because MetaCPAN is configured to resolve dev releases only
2021-05-18T05:44:23,6454,Devel::Cover Devel::Cover::Report::Coveralls| MetaDB, 400 Bad Request, https://cpanmetadb.plackperl.org/v1.0/package/Devel::Cover Devel::Cover::Report::Coveralls
2021-05-18T05:44:23,6454,Devel::Cover Devel::Cover::Report::Coveralls| MetaCPAN, 400 Bad Request, https://fastapi.metacpan.org/v1/download_url/Devel::Cover Devel::Cover::Report::Coveralls
2021-05-18T05:44:23,6454,Devel::Cover Devel::Cover::Report::Coveralls| Failed to resolve Devel::Cover Devel::Cover::Report::Coveralls
2021-05-18T05:44:23,6438| --
2021-05-18T05:44:23,6438| Installation failed. The direct cause of the failure comes from the following packages/distributions; you may want to grep this log file by them:
2021-05-18T05:44:23,6438| * Devel::Cover Devel::Cover::Report::Coveralls
Error: The process '/opt/hostedtoolcache/perl/5.32.1/x64/bin/perl' failed with exit code 1
whereas using the same configuration without install-modules
and installing the same 2 extra modules with cpm
after works perfectly well.
Hi!
Thank you for creating this! It works perfectly on Mac and Linux. I am, however, having issues running tests on Windows (one problem I think you're aware of already). However, I come bringing possible solutions.
https://github.com/p5-UV/Alien-libuv/blob/master/.github/workflows/windows.yml I am using this setup now. It's using a friend's S3 bucket site mirror for Strawberry Perl's site. It fixes the problem of not being able to test on any version. It saves you from actually having to build Perl on the Windows machine with MinGW.
If you can alter your actions to use this method along with your caching mechanism, it would allow you to have working tests on Windows for any version of Perl where there's a portable.
Running this particular set of tests I linked to above was taking around 10 minutes per run on AppVeyor and now runs in around 2 minutes and 30 seconds on GitHub Actions. It allows testing both pure Perl and XS modules and already has cpanm setup from the beginning.
Thoughts?
Install options should allow user to add options for the installers, to grant possibility to cache features or develoment mode.
Install modules does a great job to install modules listed in the main part of cpanfile
.
The user still need to implement caching to install features.
For example:
uses: shogo82148/[email protected]
with:
perl-version: 5.32
install-modules-with: cpm
- with-develop
- feature=f1,f2
would allow a single invocation, let the user benefit from the implemented caching and install development and features f1 & f2.
Hi, when I install something like bioperl
using apt-get install, it sends the libraries outside of PERL5LIB, to /usr/share/perl5
. Could you update PERL5LIB to include that? My "patch" is this step, right after the step with shogo82148/actions-setup-perl@v1
.
- name: initial envs
run: |
echo "PERL5LIB=$PERL5LIB:/usr/share/perl5" >> $GITHUB_ENV
- uses: shogo82148/actions-setup-perl@v1
with:
install-modules: Test2::V0
- run: perl -MTest2::V0 -e '#'
Fails:
2021-12-07T08:19:21.5823710Z Download action repository 'shogo82148/actions-setup-perl@v1' (SHA:88d7620362b0c09f8cf08c22d3baf4ce914a70ff)
...
2021-12-07T08:19:24.8098677Z ##[group]Run shogo82148/actions-setup-perl@v1
2021-12-07T08:19:24.8099692Z with:
2021-12-07T08:19:24.8100231Z install-modules: Test2::V0
2021-12-07T08:19:24.8101112Z perl-version: 5
2021-12-07T08:19:24.8102121Z distribution: default
2021-12-07T08:19:24.8102725Z enable-modules-cache: true
2021-12-07T08:19:24.8103323Z working-directory: .
2021-12-07T08:19:24.8103863Z ##[endgroup]
2021-12-07T08:19:26.8743365Z ##[group]install perl
2021-12-07T08:19:29.6216322Z [command]"C:\Program Files\PowerShell\7\pwsh.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ; try { [System.IO.Compression.ZipFile]::ExtractToDirectory('D:\a\_temp\bd85cb30-2474-42e9-bfdc-7fc835c094f8', 'D:\a\_temp\c302fa82-f545-4d71-9f6a-247a2d7c8053', $true) } catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath 'D:\a\_temp\bd85cb30-2474-42e9-bfdc-7fc835c094f8' -DestinationPath 'D:\a\_temp\c302fa82-f545-4d71-9f6a-247a2d7c8053' -Force } else { throw $_ } } ;"
2021-12-07T08:19:36.1966397Z
2021-12-07T08:19:36.2333376Z [command]C:\hostedtoolcache\windows\perl\5.34.0-thr\x64\bin\perl.exe -V
2021-12-07T08:19:36.7994027Z Summary of my perl5 (revision 5 version 34 subversion 0) configuration:
2021-12-07T08:19:36.7996210Z
2021-12-07T08:19:36.7996920Z Platform:
2021-12-07T08:19:36.7997919Z osname=MSWin32
2021-12-07T08:19:36.7998453Z osvers=10.0.17763.2300
2021-12-07T08:19:36.8000241Z archname=MSWin32-x64-multi-thread
2021-12-07T08:19:36.8006389Z uname=''
2021-12-07T08:19:36.8011085Z config_args='undef'
2021-12-07T08:19:36.8011879Z hint=recommended
2021-12-07T08:19:36.8012476Z useposix=true
2021-12-07T08:19:36.8013040Z d_sigaction=undef
2021-12-07T08:19:36.8013661Z useithreads=define
2021-12-07T08:19:36.8014328Z usemultiplicity=define
2021-12-07T08:19:36.8014955Z use64bitint=define
2021-12-07T08:19:36.8015546Z use64bitall=undef
2021-12-07T08:19:36.8016151Z uselongdouble=undef
2021-12-07T08:19:36.8016739Z usemymalloc=n
2021-12-07T08:19:36.8017691Z default_inc_excludes_dot=define
2021-12-07T08:19:36.8018335Z Compiler:
2021-12-07T08:19:36.8018854Z cc='gcc'
2021-12-07T08:19:36.8020153Z ccflags =' -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields'
2021-12-07T08:19:36.8021741Z optimize='-s -O2'
2021-12-07T08:19:36.8022338Z cppflags='-DWIN32'
2021-12-07T08:19:36.8022902Z ccversion=''
2021-12-07T08:19:36.8023471Z gccversion='8.1.0'
2021-12-07T08:19:36.8024043Z gccosandvers=''
2021-12-07T08:19:36.8024595Z intsize=4
2021-12-07T08:19:36.8025109Z longsize=4
2021-12-07T08:19:36.8025650Z ptrsize=8
2021-12-07T08:19:36.8026185Z doublesize=8
2021-12-07T08:19:36.8026742Z byteorder=12345678
2021-12-07T08:19:36.8027334Z doublekind=3
2021-12-07T08:19:36.8027889Z d_longlong=define
2021-12-07T08:19:36.8028459Z longlongsize=8
2021-12-07T08:19:36.8029008Z d_longdbl=define
2021-12-07T08:19:36.8030340Z longdblsize=16
2021-12-07T08:19:36.8031071Z longdblkind=3
2021-12-07T08:19:36.8031631Z ivtype='long long'
2021-12-07T08:19:36.8032160Z ivsize=8
2021-12-07T08:19:36.8033037Z nvtype='double'
2021-12-07T08:19:36.8033543Z nvsize=8
2021-12-07T08:19:36.8034038Z Off_t='long long'
2021-12-07T08:19:36.8034550Z lseeksize=8
2021-12-07T08:19:36.8035088Z alignbytes=8
2021-12-07T08:19:36.8035620Z prototype=define
2021-12-07T08:19:36.8036225Z Linker and Libraries:
2021-12-07T08:19:36.8036795Z ld='g++'
2021-12-07T08:19:36.8040587Z ldflags ='-s -L"C:\hostedtoolcache\windows\perl\5.34.0-thr\x64\lib\CORE" -L"C:\strawberry\c\lib" -L"C:\strawberry\c\x86_64-w64-mingw32\lib" -L"C:\strawberry\c\lib\gcc\x86_64-w64-mingw32\8.1.0"'
2021-12-07T08:19:36.8042638Z libpth=C:\strawberry\c\lib C:\strawberry\c\x86_64-w64-mingw32\lib C:\strawberry\c\lib\gcc\x86_64-w64-mingw32\8.1.0
2021-12-07T08:19:36.8044238Z libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
2021-12-07T08:19:36.8046107Z perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
2021-12-07T08:19:36.8047248Z libc=
2021-12-07T08:19:36.8047715Z so=dll
2021-12-07T08:19:36.8048227Z useshrplib=true
2021-12-07T08:19:36.8048823Z libperl=libperl534.a
2021-12-07T08:19:36.8049617Z gnulibc_version=''
2021-12-07T08:19:36.8050338Z Dynamic Linking:
2021-12-07T08:19:36.8050922Z dlsrc=dl_win32.xs
2021-12-07T08:19:36.8051461Z dlext=dll
2021-12-07T08:19:36.8051976Z d_dlsymun=undef
2021-12-07T08:19:36.8052671Z ccdlflags=' '
2021-12-07T08:19:36.8053182Z cccdlflags=' '
2021-12-07T08:19:36.8054381Z lddlflags='-mdll -s -L"C:\hostedtoolcache\windows\perl\5.34.0-thr\x64\lib\CORE" -L"C:\strawberry\c\lib" -L"C:\strawberry\c\x86_64-w64-mingw32\lib" -L"C:\strawberry\c\lib\gcc\x86_64-w64-mingw32\8.1.0"'
2021-12-07T08:19:36.8055382Z
2021-12-07T08:19:36.8055727Z
2021-12-07T08:19:36.8056708Z Characteristics of this binary (from libperl):
2021-12-07T08:19:36.8057428Z Compile-time options:
2021-12-07T08:19:36.8057996Z HAS_TIMES
2021-12-07T08:19:36.8058517Z HAVE_INTERP_INTERN
2021-12-07T08:19:36.8059050Z MULTIPLICITY
2021-12-07T08:19:36.8059765Z PERLIO_LAYERS
2021-12-07T08:19:36.8061201Z PERL_COPY_ON_WRITE
2021-12-07T08:19:36.8061780Z PERL_DONT_CREATE_GVSV
2021-12-07T08:19:36.8062573Z PERL_IMPLICIT_CONTEXT
2021-12-07T08:19:36.8063143Z PERL_IMPLICIT_SYS
2021-12-07T08:19:36.8063694Z PERL_MALLOC_WRAP
2021-12-07T08:19:36.8064229Z PERL_OP_PARENT
2021-12-07T08:19:36.8064819Z PERL_PRESERVE_IVUV
2021-12-07T08:19:36.8065372Z USE_64_BIT_INT
2021-12-07T08:19:36.8065883Z USE_ITHREADS
2021-12-07T08:19:36.8066424Z USE_LARGE_FILES
2021-12-07T08:19:36.8066952Z USE_LOCALE
2021-12-07T08:19:36.8067556Z USE_LOCALE_COLLATE
2021-12-07T08:19:36.8068085Z USE_LOCALE_CTYPE
2021-12-07T08:19:36.8068629Z USE_LOCALE_NUMERIC
2021-12-07T08:19:36.8069351Z USE_LOCALE_TIME
2021-12-07T08:19:36.8070049Z USE_PERLIO
2021-12-07T08:19:36.8070623Z USE_PERL_ATOF
2021-12-07T08:19:36.8071317Z Built under MSWin32
2021-12-07T08:19:36.8071892Z Compiled at Nov 23 2021 07:13:21
2021-12-07T08:19:36.8072591Z @INC:
2021-12-07T08:19:36.8073229Z C:/hostedtoolcache/windows/perl/5.34.0-thr/x64/site/lib
2021-12-07T08:19:36.8074028Z C:/hostedtoolcache/windows/perl/5.34.0-thr/x64/lib
2021-12-07T08:19:36.8074916Z
2021-12-07T08:19:36.8198425Z ##[endgroup]
2021-12-07T08:19:36.8199500Z ##[group]install CPAN modules
2021-12-07T08:19:36.8200391Z nothing to install
2021-12-07T08:19:36.8201371Z ##[endgroup]
2021-12-07T08:19:39.5752902Z ##[group]Run perl -MTest2::V0 -e '#'
2021-12-07T08:19:39.5753867Z �[36;1mperl -MTest2::V0 -e '#'�[0m
2021-12-07T08:19:39.5826206Z shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
2021-12-07T08:19:39.5826912Z env:
2021-12-07T08:19:39.5827614Z PERL5LIB: D:\a\_actions\shogo82148\actions-setup-perl\v1\scripts\lib
2021-12-07T08:19:39.5828398Z ##[endgroup]
2021-12-07T08:19:39.9909176Z Can't locate Test2/V0.pm in @INC (you may need to install the Test2::V0 module) (@INC contains: D:\a\_actions\shogo82148\actions-setup-perl\v1\scripts\lib C:/hostedtoolcache/windows/perl/5.34.0-thr/x64/site/lib C:/hostedtoolcache/windows/perl/5.34.0-thr/x64/lib).
2021-12-07T08:19:39.9912095Z BEGIN failed--compilation aborted.
2021-12-07T08:19:40.3565102Z ##[error]Process completed with exit code 1.
2021-12-07T08:19:40.3742887Z Cleaning up orphan processes
But,
- uses: shogo82148/actions-setup-perl@v1
- run: cpanm --notest Test2::V0
- run: perl -MTest2::V0 -e '#'
Works:
...
2021-12-07T08:28:28.8346074Z ##[group]Run cpanm --notest Test2::V0
2021-12-07T08:28:28.8346872Z �[36;1mcpanm --notest Test2::V0�[0m
2021-12-07T08:28:28.8406596Z shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
2021-12-07T08:28:28.8407182Z env:
2021-12-07T08:28:28.8407848Z PERL5LIB: D:\a\_actions\shogo82148\actions-setup-perl\v1\scripts\lib
2021-12-07T08:28:28.8408498Z ##[endgroup]
2021-12-07T08:28:30.2265398Z --> Working on Test2::V0
2021-12-07T08:28:30.7816814Z Fetching http://www.cpan.org/authors/id/E/EX/EXODIST/Test2-Suite-0.000144.tar.gz ... OK
2021-12-07T08:28:33.7490612Z Configuring Test2-Suite-0.000144 ... OK
2021-12-07T08:28:33.7523105Z ==> Found dependencies: Importer, Sub::Info, Module::Pluggable, Term::Table, Scope::Guard
2021-12-07T08:28:33.7528328Z --> Working on Importer
2021-12-07T08:28:33.7923749Z Fetching http://www.cpan.org/authors/id/E/EX/EXODIST/Importer-0.026.tar.gz ... OK
2021-12-07T08:28:34.3137209Z Configuring Importer-0.026 ... OK
2021-12-07T08:28:36.2489493Z Building Importer-0.026 ... OK
2021-12-07T08:28:36.2507796Z Successfully installed Importer-0.026
2021-12-07T08:28:36.3796846Z --> Working on Sub::Info
2021-12-07T08:28:36.4185058Z Fetching http://www.cpan.org/authors/id/E/EX/EXODIST/Sub-Info-0.002.tar.gz ... OK
2021-12-07T08:28:36.9723701Z Configuring Sub-Info-0.002 ... OK
2021-12-07T08:28:39.6514232Z Building Sub-Info-0.002 ... OK
2021-12-07T08:28:39.6532811Z Successfully installed Sub-Info-0.002
2021-12-07T08:28:39.7812372Z --> Working on Module::Pluggable
2021-12-07T08:28:39.8681434Z Fetching http://www.cpan.org/authors/id/S/SI/SIMONW/Module-Pluggable-5.2.tar.gz ... OK
2021-12-07T08:28:40.8812032Z Configuring Module-Pluggable-5.2 ... OK
2021-12-07T08:28:42.8144984Z Building Module-Pluggable-5.2 ... OK
2021-12-07T08:28:42.8164862Z Successfully installed Module-Pluggable-5.2
2021-12-07T08:28:42.9516523Z --> Working on Term::Table
2021-12-07T08:28:43.0432328Z Fetching http://www.cpan.org/authors/id/E/EX/EXODIST/Term-Table-0.015.tar.gz ... OK
2021-12-07T08:28:43.6342347Z Configuring Term-Table-0.015 ... OK
2021-12-07T08:28:45.7270333Z Building Term-Table-0.015 ... OK
2021-12-07T08:28:45.7277064Z Successfully installed Term-Table-0.015
2021-12-07T08:28:45.8614855Z --> Working on Scope::Guard
2021-12-07T08:28:45.9040312Z Fetching http://www.cpan.org/authors/id/C/CH/CHOCOLATE/Scope-Guard-0.21.tar.gz ... OK
2021-12-07T08:28:46.4566956Z Configuring Scope-Guard-0.21 ... OK
2021-12-07T08:28:48.3738761Z Building Scope-Guard-0.21 ... OK
2021-12-07T08:28:48.3740155Z Successfully installed Scope-Guard-0.21
2021-12-07T08:28:52.3690387Z Building Test2-Suite-0.000144 ... OK
2021-12-07T08:28:52.3704552Z Successfully installed Test2-Suite-0.000144
2021-12-07T08:28:52.9961918Z 6 distributions installed
2021-12-07T08:28:54.7173401Z ##[group]Run perl -MTest2::V0 -e '#'
2021-12-07T08:28:54.7174032Z �[36;1mperl -MTest2::V0 -e '#'�[0m
2021-12-07T08:28:54.7227118Z shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
2021-12-07T08:28:54.7227717Z env:
2021-12-07T08:28:54.7228335Z PERL5LIB: D:\a\_actions\shogo82148\actions-setup-perl\v1\scripts\lib
2021-12-07T08:28:54.7229132Z ##[endgroup]
Build log: https://github.com/shogo82148/actions-setup-perl/runs/2633923885?check_suite_focus=true
build fails here:
2021-05-20T21:12:12.8073939Z Running Mkbootstrap for Win32 ()
2021-05-20T21:12:12.8501475Z "D:\a\_temp\perl-5.34.0\miniperl.exe" "-I..\..\lib" -MExtUtils::Command -e chmod -- 644 "Win32.bs"
2021-05-20T21:12:12.9010175Z "D:\a\_temp\perl-5.34.0\miniperl.exe" "-I..\..\lib" -MExtUtils::Command::MM -e cp_nonempty -- Win32.bs ..\..\lib\auto\Win32\Win32.bs 644
2021-05-20T21:12:12.9205919Z "D:\a\_temp\perl-5.34.0\miniperl.exe" "-I..\..\lib" "..\..\lib\ExtUtils/xsubpp" -typemap D:\a\_temp\perl-5.34.0\lib\ExtUtils\typemap Win32.xs > Win32.xsc
2021-05-20T21:12:13.0364466Z "D:\a\_temp\perl-5.34.0\miniperl.exe" "-I..\..\lib" -MExtUtils::Command -e mv -- Win32.xsc Win32.c
2021-05-20T21:12:13.0897028Z gcc -c -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"0.57\" -DXS_VERSION=\"0.57\" "-I..\..\lib\CORE" Win32.c
2021-05-20T21:12:16.4564728Z "D:\a\_temp\perl-5.34.0\miniperl.exe" "-I..\..\lib" -MExtUtils::Mksymlists \
2021-05-20T21:12:16.4565826Z -e "Mksymlists('NAME'=>\"Win32\", 'DLBASE' => 'Win32', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
2021-05-20T21:12:16.4846207Z g++ Win32.def -o ..\..\lib\auto\Win32\Win32.dll -mdll -s -L"C:\hostedtoolcache\windows\perl\5.34.0\x64\lib\CORE" -L"C:\MinGW\lib" -L"C:\MinGW\x86_64-w64-mingw32\lib" -L"C:\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0" Win32.o "..\..\lib\CORE\libperl534.a" -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -Wl,--enable-auto-image-base
2021-05-20T21:12:17.3450403Z Win32.o:Win32.c:(.text+0x42a3): undefined reference to `CreateEnvironmentBlock'
2021-05-20T21:12:17.3452630Z Win32.o:Win32.c:(.text+0x4361): undefined reference to `DestroyEnvironmentBlock'
2021-05-20T21:12:18.3575520Z Win32.o:Win32.c:(.text+0x4375): undefined reference to `DestroyEnvironmentBlock'
2021-05-20T21:12:18.3576446Z collect2.exe: error: ld returned 1 exit status
2021-05-20T21:12:18.3577069Z gmake[1]: *** [Makefile:471: ..\..\lib\auto\Win32\Win32.dll] Error 1
2021-05-20T21:12:18.3577847Z Win32.o:Win32.c:(.text+0x42a3): undefined reference to `CreateEnvironmentBlock'
2021-05-20T21:12:18.3578785Z Win32.o:Win32.c:(.text+0x4361): undefined reference to `DestroyEnvironmentBlock'
2021-05-20T21:12:18.3579726Z Win32.o:Win32.c:(.text+0x4375): undefined reference to `DestroyEnvironmentBlock'
2021-05-20T21:12:18.3580535Z collect2.exe: error: ld returned 1 exit status
2021-05-20T21:12:18.3581159Z gmake[1]: *** [Makefile:471: ..\..\lib\auto\Win32\Win32.dll] Error 1
2021-05-20T21:12:18.3581802Z Unsuccessful make(cpan/Win32): code=512 at ..\make_ext.pl line 584.
The definition of CreateEnvironmentBlock had been changed by https://github.com/perl-libwin32/win32
Run shogo82148/actions-setup-perl@v1
with:
perl-version: 5.34.1
distribution: default
enable-modules-cache: true
working-directory: .
install perl
Error: Error: unable to get latest version
Although $RUNNER_TOOL_CACHE is fixed per platform, it should be documented to allow end users to cache their installed modules by the provided cpanm or cpm.
Reference: https://github.com/theory/semver/runs/657320188?check_suite_focus=true
No useful error output that I can see, sadly.
Please add a documented way to get a list of all supported Perl of every platform. Ideally this would be a Perl module. :-)
This would allow us to dynamically create the matrix without having to edit the workflow for every repository whenever there is a newer Perl version available.
At https://github.com/step-security/secure-workflows we are building a knowledge-base (KB) of GITHUB_TOKEN permissions needed by different GitHub Actions. When developers try to set minimum token permissions for their workflows, they can use this knowledge-base instead of trying to research permissions needed by each GitHub Action they use.
Below you can see the KB of your GITHUB Action.
name: "Setup Perl environment" # shogo82148/actions-setup-perl
# GITHUB_TOKEN not used
If you think this information is not accurate, or if in the future your GitHub Action starts using a different set of permissions, please create an issue at https://github.com/step-security/secure-workflows/issues to let us know.
This issue is automatically created by our analysis bot, feel free to close after reading :)
GitHub asks users to define workflow permissions, see https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/ and https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token for securing GitHub workflows against supply-chain attacks.
Setting minimum token permissions is also checked for by Open Source Security Foundation (OpenSSF) Scorecards. Scorecards recommend using https://github.com/step-security/secure-workflows so developers can fix this issue in an easier manner.
I created this workflow:
name: CI
on: [push]
jobs:
winperl514:
runs-on: windows-latest
steps:
- name: Setup perl
uses: shogo82148/actions-setup-perl@v1
with: {perl-version: "5.14"}
- run: perl -V
- run: cpm install --verbose --show-build-log-on-failure --no-test --with-recommends Win32::Pipe
Which results in this error:
Error: 2021-10-17T17:57:52,5088,Win32-Pipe-0.026| Can't locate object method "new" via package "ExtUtils::ParseXS" at D:\a\sqitch\sqitch\local\lib\perl5\ExtUtils/xsubpp line 51.
315
It is not an issue for when I simply change 5.14
to 5.16
, which builds fine.
I've started using the cache action to cache CPAN downloads. It needs to be keyed on the processor architecture and the Perl version. I'm using ${{ runner.os }}-perl5lib-${{ matrix.perl }}
, but sometimes I'm just using "latest" (example), and if there is a new release, the cache would not be compatible with the the perl version. Is there a way to identify the current version of Perl aside from the matrix? Would be nice if there were variables to indicate the major and minor versions of Perl after Perl is setup.
Since yesterday i get some errors using wget to download files.
This seems to bei a known problem after installing openssl 1.1.1.
I am getting error that certificate authority can't bei checked.
I checked for changes in the used actions and figured out that your action changes openssl in the Runner.
Here some usefull infos about that problem.
Can you pleased revert your Changes in this?
May ist's also not a good idea to change the runners environment in such a way, that it affects all other actions.
https://github.com/graphviz-perl/Graph/runs/1483639131 shows
Run shogo82148/actions-setup-perl@v1
with:
distribution: strawberry
perl-version: 5
Warning: The strawberry distribution is not available on this platform. fallback to the default distribution.
This is a breaking change, previously specifying "strawberry" was a no-op on non-Windows.
Edited to add: Also, your CI has been failing since 2 days ago?
Reference: https://github.com/theory/semver/runs/681420693
Not much of use in the logs, either. :-(
workflow file
name: test
on:
push:
branch:
- '*'
jobs:
build:
runs-on: windows-latest
steps:
- uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.32'
- run: cpanm -v CPAN::Test::Dummy::Perl5::StaticInstall
error output:
cpanm -v CPAN::Test::Dummy::Perl5::StaticInstall
...
Distribution opts in x_static_install: 1
Error: Can't locate ExtUtils/PL2Bat.pm in @INC (you may need to install the ExtUtils::PL2Bat module) (@INC contains: FatPacked::6610488=HASH(0x64de38) D:\a\_actions\shogo82148\actions-setup-perl\v1\scripts\lib C:/hostedtoolcache/windows/perl/5.32.0-thr/x64/site/lib C:/hostedtoolcache/windows/perl/5.32.0-thr/x64/lib) at D:\a\_actions\shogo82148\actions-setup-perl\v1\bin\cpanm line 240.
full log
https://github.com/skaji/github-actions-playground/runs/1651191663
Related to #456: How do I install modules listed in my Makefile.PL? Normally cpanm -l . --installdeps .
works for me normally but I would like to see the recommended way. I don't want to have to list them in both the Makefile.PL and github workflow yml file but please tell me if that is what I must be doing.
is possible to add perl x86 versions?
When you run perl -S cpanm --verbose --notest App::ReportPrereqs
with distribution: default
it gets installed like so, which is in the path:
Installing C:\hostedtoolcache\windows\perl\5.14.4\x64\bin\report-prereqs
Installing C:\hostedtoolcache\windows\perl\5.14.4\x64\bin\report-prereqs.bat
if you run the same command with distribution: strawberry
it gets installed like so, which is not in the path:
Installing C:\hostedtoolcache\windows\perl\5.14.4\x64\perl\site\bin\report-prereqs
Installing C:\hostedtoolcache\windows\perl\5.14.4\x64\perl\site\bin\report-prereqs.bat
I think ...\perl\site\bin
should be added the the path in addition to ...\bin
.
steps:
- uses: actions/checkout@v2
- name: Setup Strawberry Perl
uses: shogo82148/actions-setup-perl@v1
with:
distribution: strawberry
- name: perl -V
run: perl -V
- name: Install Dependencies
run: cpanm --installdeps --notest .
- name: Install Optional Dependencies
run: cpanm HarfBuzz::Shaper
- name: Make and run tests
run: |
perl Makefile.PL
gmake
gmake test
This gives:
2020-11-11T12:25:16.7054228Z ##[group]Run cpanm --installdeps --notest .
2020-11-11T12:25:16.7054839Z �[36;1mcpanm --installdeps --notest .�[0m
2020-11-11T12:25:16.7116968Z shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
2020-11-11T12:25:16.7117404Z env:
2020-11-11T12:25:16.7126427Z PATH: C:\hostedtoolcache\windows\perl\5....
2020-11-11T12:25:16.7135673Z PERL5LIB: D:\a\_actions\shogo82148\actions-setup-perl\v1\scripts\lib
2020-11-11T12:25:16.7136195Z ##[endgroup]
2020-11-11T12:25:17.5481692Z --> Working on .
2020-11-11T12:25:18.4404793Z Configuring D:/a/chordpro/chordpro ... OK
2020-11-11T12:25:18.4406931Z ==> Found dependencies: File::LoadLines, App::Packager, String::Interpolate::Named, Image::Info, PDF::API2, Text::Layout
2020-11-11T12:25:18.4408575Z --> Working on File::LoadLines
2020-11-11T12:25:18.4410260Z Fetching http://www.cpan.org/authors/id/J/JV/JV/File-LoadLines-0.02.tar.gz ... OK
2020-11-11T12:25:19.1609792Z Configuring File-LoadLines-0.02 ... OK
2020-11-11T12:25:21.2344265Z Building File-LoadLines-0.02 ... OK
2020-11-11T12:25:21.2345370Z Successfully installed File-LoadLines-0.02
2020-11-11T12:25:21.4841582Z --> Working on App::Packager
...
2020-11-11T12:25:42.6742274Z --> Working on Text::Layout
2020-11-11T12:25:42.6744199Z Fetching http://www.cpan.org/authors/id/J/JV/JV/Text-Layout-0.019.tar.gz ... OK
2020-11-11T12:25:43.2528134Z Configuring Text-Layout-0.019 ... OK
2020-11-11T12:25:45.2985536Z Building Text-Layout-0.019 ... OK
2020-11-11T12:25:45.2986587Z Successfully installed Text-Layout-0.019
2020-11-11T12:25:45.5568045Z <== Installed dependencies for .. Finishing.
2020-11-11T12:25:45.5568906Z 7 distributions installed
2020-11-11T12:25:45.5970316Z The system cannot find the batch label specified - endofperl
2020-11-11T12:25:45.7699371Z ##[error]Process completed with exit code 1.
Full logs attached.
logs_33.zip
When using shogo82148/[email protected] to install Perl on windows,
I noticed that when using cpm via perl-actions/install-with-cpm
I got the issue
Can't locate ExtUtils/PL2Bat.pm in @INC (you may need to install the ExtUtils::PL2Bat module)
I'm not sure who to blame here and if it's a cpm bug or actions-setup-perl one?
Switching to perl-actions/install-with-cpamm
fixed the issue for me lol
more details: https://github.com/atoomic/Clone/runs/656823399?check_suite_focus=true
Run perl-actions/[email protected]
C:\hostedtoolcache\windows\perl\5.30.2\x64\bin\perl.exe -MConfig -e "print \"$Config{installsitescript}/cpm\""
/cpm::set-output name=Get cpm from https%3A//raw.githubusercontent.com/skaji/cpm/master/cpm::
install_to d:\cpm
install: B::COW!
do_exec: C:\hostedtoolcache\windows\perl\5.30.2\x64\bin\perl.exe
C:\hostedtoolcache\windows\perl\5.30.2\x64\bin\perl.exe d:\cpm install --show-build-log-on-failure -v --no-test -g B::COW
##[error]Can't locate ExtUtils/PL2Bat.pm in @INC (you may need to install the ExtUtils::PL2Bat module) (@INC contains: FatPacked::13938184=HASH(0xd4ae08) C:/hostedtoolcache/windows/perl/5.30.2/x64/site/lib C:/hostedtoolcache/windows/perl/5.30.2/x64/lib) at d:\cpm line 599.
##[error]BEGIN failed--compilation aborted at d:\cpm line 599.
##[error]Compilation failed in require at d:\cpm line 587.
##[error]BEGIN failed--compilation aborted at d:\cpm line 587.
##[error]Compilation failed in require at d:\cpm line 858.
##[error]BEGIN failed--compilation aborted at d:\cpm line 858.
##[error]Compilation failed in require at d:\cpm line 387.
##[error]BEGIN failed--compilation aborted at d:\cpm line 387.
##[error]Compilation failed in require at d:\cpm line 383.
##[error]BEGIN failed--compilation aborted at d:\cpm line 383.
##[error]Compilation failed in require at d:\cpm line 379.
##[error]BEGIN failed--compilation aborted at d:\cpm line 379.
##[error]Compilation failed in require at d:\cpm line 299.
##[error]BEGIN failed--compilation aborted at d:\cpm line 299.
##[error]Compilation failed in require at d:\cpm line 1487.
##[error]BEGIN failed--compilation aborted at d:\cpm line 1487.
##[error]The process 'C:\hostedtoolcache\windows\perl\5.30.2\x64\bin\perl.exe' failed with exit code 2
Note: this was also reported to cpm as skaji/cpm#173
It seems to be using the latest version. Is that guaranteed behavior? Or would it be possible to support something like?
perl: latest
How much effort would it take to also support Cygwin etc on this excellent "action"? Also, what is the "default" Perl on the GH-provided Windows environment?
Looks like some recent change broke cpanm: https://github.com/DrHyde/perl-modules-Data-CompactReadonly/runs/1494632690
Related to adding support for 5.6 maybe?
Shouldn't x86_64-linux
be included in the PERL5LIB provided to the user?
For example, this:
- name: Setup Perl environment
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: 5.34
install-modules-with: cpanm
install-modules: |
Devel::Cover
Devel::Cover::Report::Coveralls
Syntax::Keyword::Try
Syntax::Keyword::Try::Deparse
# Features and Devel modules
install-modules-args: >
--metacpan
--with-develop
--with-feature=starman
Will install Deparse.pm
in
/home/runner/work/_temp/72798feb-334e-4916-9855-9c61eea578b1/lib/5.34.1/B/Deparse.pm
${GITHUB_WORKSPACE}/local/lib/perl5/x86_64-linux/Syntax/Keyword/Try/Deparse.pm
while the PERL5LIB
provided only contains
PERL5LIB=${GITHUB_WORKSPACE}/local/lib/perl5:/home/runner/work/_actions/shogo82148/actions-setup-perl/v1/scripts/lib
thus forcing Perl to rely on the system installed version of the module, which doesn't match the Perl version.
It is often of no consequences for most modules, except those which are compiled for a specific Perl version, such as Devel::Cover
or Syntax::Keyword::Try::Deparse
Similar to #420 it would be nice to be able to request a perl built with -Duselongdouble or -Dusequadmath.
NB that quadmath is a gcc-ism so probably isn't available on Windows.
Run shogo82148/[email protected]
with:
perl-version: 5.18.4
##[error](s || "").replace is not a function
more details from https://github.com/atoomic/B-COW/runs/656749538?check_suite_focus=true
If I understand correctly, saving the contents of the local
directory happens at the end of the workflow step with shogo82148/actions-setup-perl@v1
. Notably, this is different from the behavior of the actions/cache@v3
, which saves the cache at the end of the job instead.
This might cause the cache to miss some content, for example any modules that are installed in later steps in the same job manually into the local
directory. This might happen e.g. when Dist::Zilla is used to install author dependencies with dzil authordeps | cpm install -
.
There might be a better way to solve caching for this specific use case (please let me know), but it might still worth to do one or more of the following:
actions/cache@v3
I have a job like this:
jobs:
test:
strategy:
fail-fast: false
matrix:
runner: [ubuntu-latest, macos-latest, windows-latest]
perl: [ '5.32' ]
runs-on: ${{matrix.runner}}
name: OS ${{matrix.runner}} Perl ${{matrix.perl}}
steps:
- uses: actions/checkout@v2
- name: Set up perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
distribution: strawberry
I get a warning from GA "The strawberry distribution is not available on this platform" and also "fallback to the default distribution" for Linux and Mac.
Duplicating the step and using conditions helped me avoid the warnings
jobs:
test:
strategy:
fail-fast: false
matrix:
runner: [ubuntu-latest, macos-latest, windows-latest]
perl: [ '5.32' ]
runs-on: ${{matrix.runner}}
name: OS ${{matrix.runner}} Perl ${{matrix.perl}}
steps:
- uses: actions/checkout@v2
- name: Set up perl
if: ${{ startsWith( matrix.runner, 'windows-' ) }}
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
distribution: strawberry
- name: Set up perl
if: ${{ ! startsWith( matrix.runner, 'windows-' ) }}
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
Is there a better way to avoid this warning?
Current release flow is the following
releases/v1
branchv1.x.x
on releases/v1
branchv1
tag to v1.x.x
step 3 and 4 doesn't wait for finishing step 2, so new release is temporary unavailable until finishing step 2.
At the start of this project, this problem is not critical.
Because only few users use the action, and building Perl binaries finished in an hour.
But now, many users started using the project, and building Perl binaries takes long time.
so we can no longer ignore this problem.
See this run, with this bit:
cpm install --global --verbose --show-build-log-on-failure --no-test Locale::[email protected]
Leads to these errors:
2021-10-14T23:18:43,1368,ExtUtils::MakeMaker| MetaCPAN, skip, because MetaCPAN is configured to resolve dev releases only
2021-10-14T23:18:43,1368,ExtUtils::MakeMaker| MetaDB, 599 Internal Exception, https://cpanmetadb.plackperl.org/v1.0/package/ExtUtils::MakeMaker, Could not connect to 'cpanmetadb.plackperl.org:443': IO::Socket::INET: connect: A non-blocking socket operation could not be completed immediately.
2021-10-14T23:18:43,1368,ExtUtils::MakeMaker|
2021-10-14T23:18:43,1368,ExtUtils::MakeMaker| MetaCPAN, 599 Internal Exception, https://fastapi.metacpan.org/v1/download_url/ExtUtils::MakeMaker?version=6.64, Could not connect to 'fastapi.metacpan.org:443': IO::Socket::INET: connect: A non-blocking socket operation could not be completed immediately.
2021-10-14T23:18:43,1368,ExtUtils::MakeMaker| Failed to resolve ExtUtils::MakeMaker
2021-10-14T23:18:43,1368,ExtUtils::ParseXS| MetaCPAN, skip, because MetaCPAN is configured to resolve dev releases only
2021-10-14T23:18:43,1368,ExtUtils::ParseXS| MetaDB, 599 Internal Exception, https://cpanmetadb.plackperl.org/v1.0/package/ExtUtils::ParseXS, Could not connect to 'cpanmetadb.plackperl.org:443': IO::Socket::INET: connect: A non-blocking socket operation could not be completed immediately.
2021-10-14T23:18:43,1368,ExtUtils::ParseXS|
2021-10-14T23:18:43,1368,ExtUtils::ParseXS| MetaCPAN, 599 Internal Exception, https://fastapi.metacpan.org/v1/download_url/ExtUtils::ParseXS?version=3.16, Could not connect to 'fastapi.metacpan.org:443': IO::Socket::INET: connect: A non-blocking socket operation could not be completed immediately.
2021-10-14T23:18:43,1368,ExtUtils::ParseXS| Failed to resolve ExtUtils::ParseXS
Don't know if it's an old version or something about its configuration is off. Appears to work fine on 5.14 and later (can't speak to earlier versions).
actions-setup-perl v1.9.0
perl v5.8.2: https://github.com/shogo82148/actions-setup-perl/runs/1483866355?check_suite_focus=true#step:8:1925
make -j 1
`sh cflags "optimize='-O3'" miniperlmain.o` miniperlmain.c
CCCMD = cc -DPERL_CORE -c -fno-common -DPERL_DARWIN -mmacosx-version-min=10.15 -fno-strict-aliasing -I/usr/local/include -O3 -Wall
`sh cflags "optimize='-O3'" perl.o` perl.c
CCCMD = cc -DPERL_CORE -c -fno-common -DPERL_DARWIN -mmacosx-version-min=10.15 -fno-strict-aliasing -I/usr/local/include -O3 -Wall
perl.c:2901:5: error: implicit declaration of function 'kill' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
ABORT(); /* for use with undump */
^
./unixish.h:116:17: note: expanded from macro 'ABORT'
#define ABORT() kill(PerlProc_getpid(),SIGABRT);
^
1 error generated.
make: *** [perl.o] Error 1
Error: Installation failure: make -j 1 at /Users/runner/work/actions-setup-perl/actions-setup-perl/scripts/darwin/local/lib/perl5/Perl/Build.pm line 318.
perl v5.8.1: same errors with v5.8.2
perl v5.8.0: https://github.com/shogo82148/actions-setup-perl/runs/1483866455?check_suite_focus=true#step:8:228
Checking for GNU cc in disguise and/or its version number...
try.c:10:2: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
exit(0);
^
try.c:10:2: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
1 error generated.
*** WHOA THERE!!! ***
Your C compiler "cc" doesn't seem to be working!
You'd better start hunting for one and let me know about it.
Error: Installation failure: sh Configure -Dprefix=/Users/runner/hostedtoolcache/perl/5.8.0/x64 -de -Dman1dir=none -Dman3dir=none -A'eval:scriptdir=/Users/runner/hostedtoolcache/perl/5.8.0/x64/bin' at /Users/runner/work/actions-setup-perl/actions-setup-perl/scripts/darwin/local/lib/perl5/Perl/Build.pm line 318.
Error: Process completed with exit code 1.
perl v5.6.2, v5.6.1, v5.6.1: same errors with v5.8.0
I did comment this earlier on #454 but I thought it should have its own issue number to keep track of it.
It would be really helpful if there could be non-threaded builds for Windows. If I'm defining test cases in a matrix like:
platform: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
perl: [ '5.22', '5.24', '5.26', '5.28', '5.30', '5.32' ]
threaded: [ true, false ]
It's annoying to have to add exceptions for Windows non-threaded Perls.
Yes, I'm aware that it's rare to encounter non-threaded Windows perl "in the wild".
Is it a lot of work to build non-threaded perl on WIndows, or just a matter of commenting out a "skip building these" somewhere?
Because if you just skip building them because you think nobody would want them, I want them.
But if it's a lot of work, then I will try to come up with a smarter way to build my matrix, like:
platform: [ 'ubuntu:thr', 'macos:thr', 'windows:thr', 'ubuntu:nothr', 'macos:nothr', 'windows:strawberry' ]
perl: [ '5.22', '5.24', '5.26', '5.28', '5.30', '5.32' ]
On Windows, if we use shell: bash
the PATH
env variable always starts with /mingw64/bin
and /usr/bin
.
job:
runs-on: windows-latest
steps:
- uses: shogo82148/actions-setup-perl@v1
# uses powershell and runs with the Perl from actions-setup-perl
- run: perl -V
# uses bash and runs with the system Perl
- run: perl -V
shell: bash
I can't see a way to change this behavior as the /usr/bin
directory seems to be hard coded somehow and I'm not sure if deleting /usr/bin/perl.exe
on Windows is a good idea? If you don't see a way to fix the path we should document that the bash shell is not supported under Windows.
cpanm mysteriously does not install modules for me either. For example: https://github.com/lskatz/endopep_peaks/runs/1161249764?check_suite_focus=true
e.g., cpanm -l $HOME --installdeps --verbose --force .
does not read correctly from Makefile.PL
Sort of like #225
However, direct installations do work like https://github.com/lskatz/endopep_peaks/actions/runs/271010996
e.g., cpanm -l $HOME File::Which --force --notest --verbose
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.