Skip to content

Commit 292091e

Browse files
authored
Merge pull request #16 from perl-libwin32/jandubois-appveyor
Configure Win32 module for Appveyor builds
2 parents f4c7c55 + f736ad7 commit 292091e

File tree

3 files changed

+129
-0
lines changed

3 files changed

+129
-0
lines changed

.appveyor.cmd

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
@echo off
2+
call :%*
3+
goto :eof
4+
5+
:perl_setup
6+
if not defined perl_type set perl_type=strawberry
7+
cinst -y curl
8+
if "%perl_type%" == "cygwin" (
9+
start /wait c:\cygwin\setup-x86.exe -q -g -P perl -P binutils -P make -P gcc -P gcc-core -P gcc-g++ -P make -P pkg-config -P libcrypt-devel -P openssl-devel -P curl
10+
set "PATH=C:\cygwin\usr\local\bin;C:\cygwin\bin;%PATH%"
11+
) else if "%perl_type%" == "strawberry" (
12+
if not defined perl_version (
13+
cinst -y StrawberryPerl
14+
) else (
15+
cinst -y StrawberryPerl --version %perl_version%
16+
)
17+
if errorlevel 1 (
18+
type C:\ProgramData\chocolatey\logs\chocolatey.log
19+
exit /b 1
20+
)
21+
set "PATH=C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;%PATH%"
22+
) else (
23+
echo.Unknown perl type "%perl_type%"! 1>&2
24+
exit /b 1
25+
)
26+
for /f "usebackq delims=" %%d in (`perl -MConfig -e"print $Config{make}"`) do set "make=%%d"
27+
set "perl=perl"
28+
set "cpanm=call .appveyor.cmd cpanm"
29+
set "cpan=%perl% -S cpan"
30+
set TAR_OPTIONS=--warning=no-unknown-keyword
31+
goto :eof
32+
33+
:cpanm
34+
%perl% -S cpanm >NUL 2>&1
35+
if ERRORLEVEL 1 (
36+
curl -V >NUL 2>&1
37+
if ERRORLEVEL 1 cinst -y curl
38+
curl -k -L https://cpanmin.us/ -o "%TEMP%\cpanm"
39+
%perl% "%TEMP%\cpanm" -n App::cpanminus
40+
)
41+
set "cpanm=%perl% -S cpanm"
42+
%cpanm% %*
43+
goto :eof
44+
45+
:local_lib
46+
if "%perl_type%" == "cygwin" goto :local_lib_cygwin
47+
%perl% -Ilib -Mlocal::lib=--shelltype=cmd %* > %TEMP%\local-lib.bat
48+
call %TEMP%\local-lib.bat
49+
del %TEMP%\local-lib.bat
50+
goto :eof
51+
52+
:local_lib_cygwin
53+
for /f "usebackq delims=" %%d in (`sh -c "cygpath -w $HOME/perl5"`) do (
54+
c:\perl\bin\perl.exe -Ilib -Mlocal::lib - %%d --shelltype=cmd > "%TEMP%\local-lib.bat"
55+
)
56+
setlocal
57+
call "%TEMP%\local-lib.bat"
58+
endlocal & set "PATH=%PATH%"
59+
set "PATH_BACK=%PATH%"
60+
%perl% -Ilib -Mlocal::lib - --shelltype=cmd > "%TEMP%\local-lib.bat"
61+
call "%TEMP%\local-lib.bat"
62+
set "PATH=%PATH_BACK%"
63+
del "%TEMP%\local-lib.bat"
64+
goto :eof
65+
66+
:eof

.appveyor.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
version: '{build}'
2+
shallow_clone: true
3+
4+
matrix:
5+
fast_finish: true
6+
7+
environment:
8+
matrix:
9+
- perl_type: cygwin
10+
- perl_type: strawberry
11+
perl_version: 5.28.0.1
12+
- perl_type: strawberry
13+
perl_version: 5.26.1.1
14+
- perl_type: strawberry
15+
perl_version: 5.24.3.1
16+
- perl_type: strawberry
17+
perl_version: 5.22.3.1
18+
- perl_type: strawberry
19+
perl_version: 5.20.3.3
20+
- perl_type: strawberry
21+
perl_version: 5.18.4.1
22+
- perl_type: strawberry
23+
perl_version: 5.16.3.20170202
24+
- perl_type: strawberry
25+
perl_version: 5.14.4.1
26+
27+
install:
28+
- 'call .appveyor.cmd perl_setup'
29+
- '%perl% -V'
30+
- '%cpanm% --installdeps -n .'
31+
32+
build: off
33+
34+
test_script:
35+
- '%cpanm% --test-only -v .'

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Build
2+
/MANIFEST.SKIP.bak
3+
/MANIFEST.bak
4+
META.YML
5+
MYMETA*
6+
Makefile
7+
Makefile.old
8+
SSL
9+
blib
10+
blib/
11+
.build/
12+
_build/
13+
cover_db/
14+
/_eumm/
15+
/UV*
16+
Win32-*/
17+
Win32-*.tar.gz
18+
.perl-version
19+
pm_to_blib
20+
*.sw*
21+
*.tar.gz
22+
xx*
23+
*.bs
24+
*.o
25+
Win32.c
26+
Win32.o
27+
Win32.def
28+
.vscode/

0 commit comments

Comments
 (0)