Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 9a79df7

Browse files
committed
travis+appveyor: activate automatic deployment
every smoke/relprep build should trigger a github release (nightly). esp. a windows sfx exe. and then also full tagged builds. on linux this should trigger Porting/makerel Windows with MSVC12 needs the msvcr120.dll runtime. Available e.g. from the Microsoft VS 2013 C++ Redistributable Package from https://www.microsoft.com/en-us/download/details.aspx?id=40784
1 parent e54352f commit 9a79df7

File tree

3 files changed

+137
-48
lines changed

3 files changed

+137
-48
lines changed

.travis.yml

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ branches:
2828
- /smoke/
2929
- /coverity/
3030
- /^maint-/
31+
- /^cperl-/
3132
env:
3233
matrix:
33-
- CONFIGURE_OPTION='' XCC='gcc' XBITS=64
34+
- CONFIGURE_OPTION='' XCC='gcc' XBITS=64 DEPLOY=1
3435
- CONFIGURE_OPTION='-Duse64bitint' XCC="'gcc\ -m32'" XBITS=32
3536
- CONFIGURE_OPTION='-DDEBUGGING -Duseshrplib' XCC='clang'
3637
- CONFIGURE_OPTION='-Duse64bitall -Dusethreads -Duselongdouble' XCC='clang'
@@ -39,24 +40,56 @@ env:
3940
secure: t+N5w1yMOdTvDIu7g09ujEQ80Rz0p/hV+uYnoPBex0pSHJKAvEWqL/PltzTNaOwoh9BRjJiSCaO6Owbpib5skZw+kwx6G+jeMzI+m00VI2P2//xUasG2KaYH1CTu+o2BE16cmZFjDs1R2UKYuTg/2lzY0SoUuNYcAr7MDUnc6hdx/uC0B37vW//MlDb/I+3bi4Wjkg+zH2T2dWqcaKP9cL4O1Oa9ApEZgaQcSv26MmBrGJm0dKaorF5vVf1xkVe6lfKVPCepcI424wkEbmBfZs5I8FajYdWscEQ0KxYY9paWUA9/71uREhuu2tecN9sc2ym2PV5ycHn0igixwuWqMV69iTO+CW7bX+1mFdfMq/TsnhRhwGVTpt0aBTup9VOkjZAqtqcc4ziQ15R6sIrAorzz97v2oFXL+q5FPQuqtY4opw8QsrnjAmonoBjNIZau8mX1VAyBTOTJjfY2bZQXNqpxFoGAfQgDhDjA+EYiQ8dK8glBOPxlEWeCeOFgA/ddrTFSTMCbDd3f0dJIOs8aQHAGcIpKEI2/3DY2JNvotku5e1us16v3YSLJwaWV4pEh3UaGhVU74TrzfA4NiOaf54OXSjLJVuBrpEMyPwVHxF5NA3W7zj9vACxcexRQAu3ms0J6XOaGYZuk5jYkefVpUILdPuSqVhRIs7Y4LqzqAYA=
4041
matrix:
4142
fast_finish: true
43+
allow_failures:
44+
- env: CONFIGURE_OPTION='-Dusethreads -DDEBUGGING -Duse64bitall -Dld=c++' XCC='c++'
4245
script:
43-
- test -n $TRAVIS_TAG && CONFIGURE_OPTION="$CONFIGURE_OPTION -Dusedevel";
44-
./Configure -des -Uversiononly -Dcc="$XCC" $CONFIGURE_OPTION -Dprefix=$HOME/cperl/usr &&
45-
make -j4 -s
46-
- if [ ${TRAVIS_OS_NAME} = "linux" -o -z "`echo $CONFIGURE_OPTION | grep 'DDEBUGGING'
46+
- function shell_session_update { true; } ; CFG=$CONFIGURE_OPTION ;
47+
test -n "$TRAVIS_TAG" && CONFIGURE_OPTION="$CFG -Dusedevel";
48+
test -z "$DEPLOY" && CONFIGURE_OPTION="$CONFIGURE_OPTION -Dprefix=$HOME/cperl/usr";
49+
./Configure -des -Uversiononly -Dcc="$XCC" $CONFIGURE_OPTION &&
50+
make -s -j4 || ( test "${TRAVIS_OS_NAME}" = "linux" -a
51+
"${CFG}" = "-Dusethreads -DDEBUGGING -Duse64bitall -Dld=c++" && true )
52+
# skip test on darwin debugging (too slow). also: do install only once
53+
#was: TEST_JOBS=4 make -s -j4 test_harness && make -s install && $HOME/cperl/usr/bin/cperlivp -p;
54+
- if [ "${TRAVIS_OS_NAME}" = "linux" -o -z "`echo $CONFIGURE_OPTION | grep 'DDEBUGGING'
4755
2>/dev/null`" ]; then
48-
TEST_JOBS=4 make -s -j4 test_harness && make -s install && $HOME/cperl/usr/bin/cperlivp -p;
56+
if [ -n "$DEPLOY" ]; then
57+
TEST_JOBS=4 make -s -j4 all test_harness install DESTDIR=$HOME/cperl-inst ;
58+
else
59+
TEST_JOBS=4 make -s -j4 test_harness ;
60+
fi
4961
fi
62+
after_success:
63+
# deploy on condition does not work
64+
- if [ -z "$DEPLOY" ]; then exit 0; fi
5065
before_deploy:
51-
- if [ -z $CONFIGURE_OPTION -a test -n $XBITS ]; then
52-
tar -czvf cperl-${TRAVIS_TAG}-${TRAVIS_OS_NAME}${XBITS}.tar.gz -C $HOME/cperl *;
53-
fi
66+
# every tag release
67+
- if [ "${TRAVIS_OS_NAME}" = "linux" -a -n "$DEPLOY" ]; then
68+
make distclean >/dev/null 2>/dev/null ;
69+
git clean -dxf ;
70+
perl Porting/makerel -bx ;
71+
elif [ "${TRAVIS_OS_NAME}" = "darwin" -a -n "$DEPLOY" ]; then
72+
version=`Porting/perl_version` ;
73+
out=../`git describe --long --tags --always`.pkg ;
74+
echo "<pkg-info></pkg-info>" > .pkginfo ;
75+
pkgbuild --identifier cperl --root DESTDIR=$HOME/cperl-inst
76+
--info .pkginfo --version $version --ownership recommended $out ;
77+
else
78+
exit 0 ;
79+
fi ;
5480
deploy:
5581
provider: releases
56-
file: cperl-${TRAVIS_TAG}-${TRAVIS_OS_NAME}${XBITS}.tar.gz
82+
file_glob: true
83+
file:
84+
- ../cperl-*.tar.*
85+
- ../cperl-*.pkg
86+
api_key:
87+
secure: "cF/kOo548pG4lL4BBCIS0T5ruFJO7xq6Tkcr+5SacXxfJKbdK9hue/nUahViskVNeI3c5VpggTJwMvS+kolAIJtasBbsea1eqCw2juQHkr7GWFOqJs9MzhFSO1+FPOBMiIQghA2eTJupDeZPjandjqy8J5BB+xXuIYjxQ+m5xxwxDNnZPjEw0+V2rTvfGAmNsQA80DpUsXfiUJNSa5rD7tujDUxbtnHrUVYfSfaHpO4o6n7vvtfOqNIKXigG6IaOXGvlVYt/Zwj9lyYcj8ZJpbKSSTEDiN5A8yugwAA/JrXI/CBO5Ex802napXxTj9vC1GQU58fxiTRo0aeTjwldU5TN82GFmyDXvPRcY/teJTTH19XlDeffle7KPmd2bk33wGloAOXUkKapQJVWh7SGer57XF/DYcycPJdcbxCVZCAHOua+JxA/4JNFKn+qyLqC6ASKGimmZ4Q0AmcGtGdR36vls9IaOIOBGXyKktoA9H4yI1sr+yAnrjZV9Fk6ngdjB7zXTMtR7ccc0BSb6xX5mo90XjJPogyaRzWJEeAJrFNluM15B6R2uwv3hR3MdSFuzEAdcMcWFeiGzyvGMcnGwk556CItSgdWz8cyXa3lkdkI405drAZ79oHhRUbbRrmCJnUd1MKpPev2wb5Y4KKk/O59s2mar5V5ORML35Pfq9w="
5788
skip_cleanup: true
89+
overwrite: true
5890
on:
5991
tags: true
92+
condition: $DEPLOY=1
6093
notifications:
6194
irc:
6295
channels:

appveyor.yml

Lines changed: 49 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,61 +10,78 @@ platform:
1010
- x86
1111
environment:
1212
matrix:
13+
- MSVC_VERSION: 12
1314
- MSVC_VERSION: 10
14-
- MSVC_VERSION: 12
15+
- MSVC_VERSION: 14
1516
clone_depth: 1
1617
branches:
1718
only:
1819
- master
19-
- /smoke/
20+
- /^smoke/
2021
- /^maint-/
22+
- /^cperl-/
2123
init:
2224
- git config --global core.autocrlf input
25+
# Disable popups as they hang the build as there is nobody to click on the OK button...
26+
# Hanging the build is a lot less user friendly than reporting a build failure.
27+
#
28+
# Disable of system hard error popup
29+
# See: https://msdn.microsoft.com/en-us/library/bb513638%28VS.85%29.aspx
30+
- reg add "HKLM\SYSTEM\CurrentControlSet\Control\Windows" /f /v ErrorMode /d 2
31+
# Disable the following popup on program failure:
32+
# | ** <program name> has stopped working ** |
33+
# | Windows can check online for a solution to the problem|
34+
# | - Check online for a solution and close the program |
35+
# | - Close the program |
36+
# See: https://msdn.microsoft.com/en-us/library/bb513638%28VS.85%29.aspx
37+
- reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /f /v DontShowUI /d 1
2338
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
2439

2540
# from https://github.com/apache/lucy-clownfish/blob/master/appveyor.yml
2641
build: off
2742

2843
test_script:
2944
- 't\appveyor-smoke.bat'
30-
31-
# nope: https://ci.appveyor.com/project/rurban/cperl/build/job/ui7b0dk0gprw1eo2
32-
# - cinst ruby.devkit
33-
# - cinst make
34-
#install:
35-
# - cinst mingw
36-
# - SET PATH=%PATH%;C:\tools\mingw64\bin;C:\tools\mingw64\opt\bin
37-
# - mingw-get install mingw-developer-toolkit
38-
#build_script:
39-
# - cd win32
40-
# - mingw32-make
41-
#test_script:
42-
# - mingw32-make test
43-
44-
deploy_script:
45-
- cmd: >-
46-
if "%MSVC_VERSION%" == "10" exit /b
47-
nmake install CCTYPE=MSVC120 USE_NO_REGISTRY=define
48-
C:\cperl\bin\cperlivp
49-
7z a -y -sfx cperl-%APPVEYOR_REPO_TAG_NAME%-win%PLATFORM%.exe c:\cperl\
50-
del /s /f /q C:\cperl
5145

46+
# appveyor cannot glob * in names
5247
artifacts:
53-
- path: cperl-$(APPVEYOR_REPO_TAG_NAME)-win$(PLATFORM).exe
54-
name: cperl-$(APPVEYOR_REPO_TAG_NAME)-win$(PLATFORM).exe
48+
- path: cperl-$(appveyor_build_version)-win32.exe
49+
name: nightly-32
50+
type: exe
51+
- path: cperl-$(appveyor_build_version)-win64.exe
52+
name: nightly-64
53+
type: exe
54+
- path: $(APPVEYOR_REPO_TAG_NAME)-win32.exe
55+
name: tagged-32
56+
type: exe
57+
- path: $(APPVEYOR_REPO_TAG_NAME)-win64.exe
58+
name: tagged-64
5559
type: exe
5660

5761
deploy:
58-
release: $(APPVEYOR_REPO_TAG_NAME)
59-
description: 'cperl windows sfx'
60-
provider: GitHub
62+
- provider: GitHub
63+
tag: cperl-win-$(appveyor_build_version)
64+
description: 'cperl windows sfx nightly (msvcr120.dll)'
65+
auth_token:
66+
secure: AsIAOIgCJX0QhrUKal2V00aaB5nRWtmtFTFeDVsGnbJLeEQpv9avUp0HT1cA8bNs
67+
artifact: nightly-32,nightly-64
68+
draft: true
69+
prerelease: true
70+
force_update: true
71+
on:
72+
branch: /(master|relprep|cperl-tag-deploy-test)/
73+
MSVC_VERSION: 12
74+
- provider: GitHub
75+
tag: $(APPVEYOR_REPO_TAG_NAME)-win
76+
description: 'cperl windows sfx tagged (msvcr120.dll)'
6177
auth_token:
62-
secure: "zWVKDFnHOuiPTPwo4/BAzTmn/4TPb4MqkmBYaOpom7L46StKDYA8j81hcdsjnAqZUDKEOTY54ASXV/LqaaVn19bggqT8pZg04/uAv1Ci9bOYKKBsD1W/4kws+1o4IdIVO4m6uSlapSFZPExMl/+BNwoiPuJc6Xbfyuh86p5MQ7nqjYxycLXybDrvLtwSGm8XghxGK3/93q8/LF+BVe+ZsaCrozj8Nd0nnzzzuwxGi+VJPhbDp5BH8p06n7eCv5AMR9p1urNQ3XyrdO9GGDuRNzJf6TZHvYJXl0aM8HRklgdMZl2/FQgcRznk9PZFw5n/NttqZvLKh8mTDqfcXAv3JRHZuzSnyY2netUD1/VmUd6TCCM+8zVp3/592tkr2A6tQfmZvFMLeLH5waVC/vRw3UpljEZ0I/3Jac3gE2T36UJmF+k5DWWWBfjGnvJ2S1MTre/nlBgB+gPXZ/XZOt+dBrjFts8Q3gUTgE2IPJUrkOaGKmj8mXcPL/mES6MPIdfJGKDTVd+XwzDD2TNa6D//Y6LcfBCuIF/gQm6ipSDpQLrm52MqXAWLjGpnjj+JKoSrOcoV4GgzzrA90AJr1SBEOttHNPcuZgRJ3krMYsjsYpNR164XBCcRDXYwQl80JpHdC2bAn7Bnv59etJdF+LETxedvGsPfbRU2u9DhoCqegEU="
63-
artifact: cperl-$(APPVEYOR_REPO_TAG_NAME)-win$(PLATFORM).exe
64-
draft: false
65-
prerelease: false
78+
secure: AsIAOIgCJX0QhrUKal2V00aaB5nRWtmtFTFeDVsGnbJLeEQpv9avUp0HT1cA8bNs
79+
artifact: tagged-32,tagged-64
80+
draft: true
81+
force_update: true
6682
on:
6783
appveyor_repo_tag: true
84+
MSVC_VERSION: 12
6885

6986
notifications:
7087
- provider: Email

t/appveyor-smoke.bat

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,66 @@
33
if not "%PLATFORM%" == "x64" set WIN64=undef
44
if "%MSVC_VERSION%" == "10" goto msvc_10
55
if "%MSVC_VERSION%" == "12" goto msvc_12
6+
if "%MSVC_VERSION%" == "14" goto msvc_14
7+
8+
:msvc_10
9+
10+
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /%PLATFORM%
11+
if "%PLATFORM%" == "x64" ( set "PATH=C:\windows\system32;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\x64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin;C:\windows;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin;C:\Program Files\7-Zip;" ) ELSE ( set "PATH=C:\windows\system32;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin;C:\windows;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\7-Zip;" )
12+
13+
cd win32
14+
rem if "%PLATFORM%" == "x64" exit /b
15+
rem if "%PLATFORM%" == "x86" set PERL_ENCODE_DEBUG=1
16+
nmake test CCTYPE=MSVC100 USE_NO_REGISTRY=define || exit /b
17+
18+
exit /b
619

720
:msvc_12
821
if "%PLATFORM%" == "x64" set PLATFORM=amd64
922
call "C:\Program Files (x86)\Microsoft Visual Studio %MSVC_VERSION%.0\VC\vcvarsall.bat" %PLATFORM%
1023
rem Env var PLATFORM changes, the X is really capitalized.
1124
rem Trim PATH to the minimum to build cperl less IO and CPU by not searching
1225
rem many dozens of dirs when loading DLLs and starting processes.
13-
if "%PLATFORM%" == "X64" ( set "PATH=C:\windows\system32;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64;C:\Program Files (x86)\Windows Kits\8.1\bin\x64;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\windows;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin" ) ELSE ( set "PATH=C:\windows\system32;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\windows;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin" )
26+
if "%PLATFORM%" == "X64" ( set "PATH=C:\windows\system32;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64;C:\Program Files (x86)\Windows Kits\8.1\bin\x64;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\windows;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin;C:\Program Files\7-Zip;" ) ELSE ( set "PATH=C:\windows\system32;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\windows;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\7-Zip;" )
1427

1528
cd win32
1629
rem if "%PLATFORM%" == "X64" exit /b
1730
rem if "%PLATFORM%" == "x86" set PERL_ENCODE_DEBUG=1
1831
nmake test CCTYPE=MSVC120 USE_NO_REGISTRY=define || exit /b
32+
33+
rem install on master/relprep/tag
34+
if "%APPVEYOR_REPO_TAG%" == "true" goto tag
35+
if "%APPVEYOR_REPO_BRANCH%" == "master" goto nightly
36+
if "%APPVEYOR_REPO_BRANCH%" == "smoke/relprep" goto nightly
37+
if "%APPVEYOR_REPO_BRANCH%" == "cperl-tag-deploy-test" goto nightly
1938
exit /b
2039

21-
:msvc_10
22-
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /%PLATFORM%
23-
if "%PLATFORM%" == "x64" ( set "PATH=C:\windows\system32;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\x64;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin;C:\windows;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin" ) ELSE ( set "PATH=C:\windows\system32;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin;C:\windows;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin" )
40+
:nightly
41+
nmake install CCTYPE=MSVC120 USE_NO_REGISTRY=undef
42+
cd ..
43+
set BITS=64
44+
if %PLATFORM% == x86 set BITS=32
45+
7z a -y -sfx cperl-%APPVEYOR_BUILD_VERSION%-win%BITS%.exe c:\cperl\
46+
del /s /f /q C:\cperl
47+
exit /b
48+
49+
:tag
50+
nmake install CCTYPE=MSVC120 USE_NO_REGISTRY=undef
51+
cd ..
52+
set BITS=64
53+
if %PLATFORM% == x86 set BITS=32
54+
7z a -y -sfx %APPVEYOR_REPO_TAG_NAME%-win%BITS%.exe c:\cperl\
55+
del /s /f /q C:\cperl
56+
57+
exit /b
58+
59+
:msvc_14
60+
if "%PLATFORM%" == "x64" set PLATFORM=amd64
61+
call "C:\Program Files (x86)\Microsoft Visual Studio %MSVC_VERSION%.0\VC\vcvarsall.bat" %PLATFORM%
62+
set
63+
if "%PLATFORM%" == "X64" ( set "PATH=C:\windows\system32;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64;C:\Program Files (x86)\Windows Kits\8.1\bin\x64;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\windows;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin;C:\Program Files\7-Zip;" ) ELSE ( set "PATH=C:\windows\system32;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\windows;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\7-Zip;" )
2464

2565
cd win32
26-
rem if "%PLATFORM%" == "x64" exit /b
2766
rem if "%PLATFORM%" == "x86" set PERL_ENCODE_DEBUG=1
28-
nmake test CCTYPE=MSVC100 USE_NO_REGISTRY=define || exit /b
67+
nmake test CCTYPE=MSVC140 USE_NO_REGISTRY=define || exit /b
2968
exit /b

0 commit comments

Comments
 (0)