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

Commit dec02cb

Browse files
committed
travis+appveyor: fix 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
1 parent e54352f commit dec02cb

File tree

3 files changed

+151
-36
lines changed

3 files changed

+151
-36
lines changed

.travis.yml

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,68 @@ branches:
2828
- /smoke/
2929
- /coverity/
3030
- /^maint-/
31+
- /^cperl-/
3132
env:
3233
matrix:
33-
- CONFIGURE_OPTION='' XCC='gcc' XBITS=64
34-
- CONFIGURE_OPTION='-Duse64bitint' XCC="'gcc\ -m32'" XBITS=32
35-
- CONFIGURE_OPTION='-DDEBUGGING -Duseshrplib' XCC='clang'
36-
- CONFIGURE_OPTION='-Duse64bitall -Dusethreads -Duselongdouble' XCC='clang'
37-
- CONFIGURE_OPTION='-Dusethreads -DDEBUGGING -Duse64bitall -Dld=c++' XCC='c++'
34+
- CONFIGURE_OPTION='' XCC='gcc' XBITS=64 DEPLOY=1
35+
#- CONFIGURE_OPTION='-Duse64bitint' XCC="'gcc\ -m32'" XBITS=32
36+
#- CONFIGURE_OPTION='-DDEBUGGING -Duseshrplib' XCC='clang'
37+
#- CONFIGURE_OPTION='-Duse64bitall -Dusethreads -Duselongdouble' XCC='clang'
38+
#- CONFIGURE_OPTION='-Dusethreads -DDEBUGGING -Duse64bitall -Dld=c++' XCC='c++'
3839
global:
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: TRAVIS_OS_NAME=linux 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+
- 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 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 *;
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 ;
5379
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: 62 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,40 @@ platform:
1010
- x86
1111
environment:
1212
matrix:
13-
- MSVC_VERSION: 10
14-
- MSVC_VERSION: 12
13+
- MSVC_VERSION: 12
14+
#- MSVC_VERSION: 10
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
38+
#- cmd: if "%MSVC_VERSION%" == "12" cinst 7zip.commandline -y
2339
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
2440

2541
# from https://github.com/apache/lucy-clownfish/blob/master/appveyor.yml
2642
build: off
2743

2844
test_script:
2945
- 't\appveyor-smoke.bat'
30-
46+
3147
# nope: https://ci.appveyor.com/project/rurban/cperl/build/job/ui7b0dk0gprw1eo2
3248
# - cinst ruby.devkit
3349
# - cinst make
@@ -41,30 +57,56 @@ test_script:
4157
#test_script:
4258
# - mingw32-make test
4359

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
60+
#deploy_script:
61+
# - IF "%MSVC_VERSION%"=="10" exit /b
62+
# - IF "%DEPLOY%"=="" exit /b
63+
# - IF "%APPVEYOR_REPO_TAG%"=="true" (
64+
# 7z a -y -sfx %APPVEYOR_REPO_TAG_NAME%-win%PLATFORM%.exe c:\cperl\
65+
# )
66+
# - IF "%APPVEYOR_REPO_TAG%"=="false" (
67+
# 7z a -y -sfx cperl-%appveyor_build_version%-win%PLATFORM%.exe c:\cperl\
68+
# )
69+
# - del /s /f /q C:\cperl
5170

71+
# appveyor cannot glob * in names
5272
artifacts:
53-
- path: cperl-$(APPVEYOR_REPO_TAG_NAME)-win$(PLATFORM).exe
54-
name: cperl-$(APPVEYOR_REPO_TAG_NAME)-win$(PLATFORM).exe
73+
- path: cperl-$(appveyor_build_version)-win32.exe
74+
name: nightly-32
75+
type: exe
76+
- path: cperl-$(appveyor_build_version)-win64.exe
77+
name: nightly-64
78+
type: exe
79+
- path: $(APPVEYOR_REPO_TAG_NAME)-win32.exe
80+
name: tagged-32
81+
type: exe
82+
- path: $(APPVEYOR_REPO_TAG_NAME)-win64.exe
83+
name: tagged-64
5584
type: exe
5685

5786
deploy:
58-
release: $(APPVEYOR_REPO_TAG_NAME)
59-
description: 'cperl windows sfx'
60-
provider: GitHub
87+
- provider: GitHub
88+
tag: cperl-win-$(appveyor_build_version)
89+
description: 'cperl windows sfx nightly'
90+
auth_token:
91+
secure: AsIAOIgCJX0QhrUKal2V00aaB5nRWtmtFTFeDVsGnbJLeEQpv9avUp0HT1cA8bNs
92+
artifact: nightly-32,nightly-64
93+
draft: true
94+
prerelease: true
95+
force_update: true
96+
on:
97+
branch: /(master|relprep|cperl-tag-deploy-test)/
98+
MSVC_VERSION: 12
99+
- provider: GitHub
100+
tag: $(APPVEYOR_REPO_TAG_NAME)-win
101+
description: 'cperl windows sfx tagged'
61102
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
103+
secure: AsIAOIgCJX0QhrUKal2V00aaB5nRWtmtFTFeDVsGnbJLeEQpv9avUp0HT1cA8bNs
104+
artifact: tagged-32,tagged-64
105+
draft: true
106+
force_update: true
66107
on:
67108
appveyor_repo_tag: true
109+
MSVC_VERSION: 12
68110

69111
notifications:
70112
- provider: Email

t/appveyor-smoke.bat

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,64 @@
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
67

78
:msvc_12
89
if "%PLATFORM%" == "x64" set PLATFORM=amd64
910
call "C:\Program Files (x86)\Microsoft Visual Studio %MSVC_VERSION%.0\VC\vcvarsall.bat" %PLATFORM%
1011
rem Env var PLATFORM changes, the X is really capitalized.
1112
rem Trim PATH to the minimum to build cperl less IO and CPU by not searching
1213
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" )
14+
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;" )
1415

1516
cd win32
1617
rem if "%PLATFORM%" == "X64" exit /b
1718
rem if "%PLATFORM%" == "x86" set PERL_ENCODE_DEBUG=1
18-
nmake test CCTYPE=MSVC120 USE_NO_REGISTRY=define || exit /b
19+
20+
rem nmake test CCTYPE=MSVC120 USE_NO_REGISTRY=define || exit /b
21+
22+
rem install on master/relprep/tag
23+
if "%APPVEYOR_REPO_TAG%" == "true" goto tag
24+
if "%APPVEYOR_REPO_BRANCH%" == "master" goto nightly
25+
if "%APPVEYOR_REPO_BRANCH%" == "smoke/relprep" goto nightly
26+
if "%APPVEYOR_REPO_BRANCH%" == "cperl-tag-deploy-test" goto nightly
27+
exit /b
28+
29+
:nightly
30+
nmake install CCTYPE=MSVC120 USE_NO_REGISTRY=undef
31+
cd ..
32+
set BITS=64
33+
if %PLATFORM% == x86 set BITS=32
34+
7z a -y -sfx cperl-%APPVEYOR_BUILD_VERSION%-win%BITS%.exe c:\cperl\
35+
del /s /f /q C:\cperl
36+
exit /b
37+
38+
:tag
39+
nmake install CCTYPE=MSVC120 USE_NO_REGISTRY=undef
40+
cd ..
41+
set BITS=64
42+
if %PLATFORM% == x86 set BITS=32
43+
7z a -y -sfx %APPVEYOR_REPO_TAG_NAME%-win%BITS%.exe c:\cperl\
44+
del /s /f /q C:\cperl
1945
exit /b
2046

2147
:msvc_10
48+
exit /b
49+
2250
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" )
51+
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;" )
52+
53+
cd win32
54+
rem if "%PLATFORM%" == "x64" exit /b
55+
rem if "%PLATFORM%" == "x86" set PERL_ENCODE_DEBUG=1
56+
nmake test CCTYPE=MSVC100 USE_NO_REGISTRY=define || exit /b
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
2666
rem if "%PLATFORM%" == "x64" exit /b

0 commit comments

Comments
 (0)