From f3b408e1d3259b549892a37c083f9a300a8a4de4 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 2 Apr 2017 22:14:43 +0000 Subject: [PATCH] Test PHP 7.0 at AppVeyor --- .travis.yml | 3 ++- appveyor.yml | 39 +++++++++++++++++++++++++++++++-------- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7e38c499c9d..5c2b0eb7b83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ cache: timeout: 691200 directories: - .temp - - vendor + #- vendor - $HOME/.ccache - $HOME/.composer/cache @@ -79,6 +79,7 @@ before_install: install: - travis_retry composer install --prefer-source --no-interaction --ignore-platform-reqs + - git submodule --quiet update --init --recursive - bash tests/_ci/install_prereqs_$PHP_MAJOR.sh - bash tests/_ci/install_zephir_parser.sh - bash tests/_ci/install_zephir.sh diff --git a/appveyor.yml b/appveyor.yml index ff2d9d83984..75713b27442 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,6 +6,9 @@ environment: - PHP_TARGET: 5.6 PHP_VC: 11 PHP_MAJOR: 5 + - PHP_TARGET: 7.0 + PHP_VC: 14 + PHP_MAJOR: 7 PHP_SDK: c:\projects\php-sdk PHP_DEVPACK: c:\projects\php-devpack @@ -13,10 +16,15 @@ clone_depth: 1 clone_folder: c:\projects\phalcon init: + - SET PATH=C:\Program Files (x86)\MSBuild\%PHP_VC%.0\Bin;C:\Program Files\OpenSSL;C:\php;c:\projects\php-sdk\bin;c:\projects\php-devpack;%PATH% + - SET PATH=C:\Program Files (x86)\Microsoft Visual Studio %PHP_VC%.0\VC;C:\Program Files (x86)\Microsoft Visual Studio %PHP_VC%.0\VC\bin;%PATH% - SET ANSICON=121x90 (121x90) - SET COMPOSER_NO_INTERACTION=1 - SET PARSER_RELEASE=1.0.1 - SET PARSER_VERSION=1.0.1-232 + - SET IMAGICK_VERSION=3.4.3rc4 + - SET IMAGEMAGICK_VERSION=6.9.3-7 + - SET PHP_SECURITY_FLAGS=1 cache: - vendor -> composer.json @@ -36,6 +44,24 @@ install: - appveyor DownloadFile http://windows.php.net/downloads/releases/sha1sum.txt - ps: $env:PHP_VERSION=type sha1sum.txt | where { $_ -match "php-(${env:PHP_TARGET}\.\d+)-src" } | foreach { $matches[1] } - ps: $env:PARSER_DOWNLOAD_URL="https://github.com/phalcon/php-zephir-parser/releases/download/v${env:PARSER_RELEASE}/zephir_parser_${env:PLATFORM}_vc${env:PHP_VC}_php${env:PHP_VERSION}_${env:PARSER_VERSION}.zip" + - ps: >- + If ($env:PHP_TYPE -Match "nts-Win32") { + $env:IMAGICK_DOWNLOAD_URL="http://windows.php.net/downloads/pecl/releases/imagick/${env:IMAGICK_VERSION}/php_imagick-${env:IMAGICK_VERSION}-${env:PHP_TARGET}-nts-vc${env:PHP_VC}-${env:PLATFORM}.zip" + } Else { + $env:IMAGICK_DOWNLOAD_URL="http://windows.php.net/downloads/pecl/releases/imagick/${env:IMAGICK_VERSION}/php_imagick-${env:IMAGICK_VERSION}-${env:PHP_TARGET}-ts-vc${env:PHP_VC}-${env:PLATFORM}.zip" + } + - ps: >- + If ($env:PHP_VC -eq '11') { + $env:VSCOMNTOOLS=$env:VS110COMNTOOLS + } Elseif ($env:PHP_VC -eq '14') { + $env:VSCOMNTOOLS=$env:VS140COMNTOOLS + } + If ($env:PLATFORM -eq 'x64') { + $env:ARCH='x86_amd64' + } Else { + $env:ARCH='x86' + } + # ================================================== - echo Initializing Build... # ================================================== @@ -59,7 +85,7 @@ install: # ================================================== - ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/releases/php-devel-pack-' + ${env:PHP_VERSION} + '-Win32-VC' + ${env:PHP_VC} + '-' + ${env:PLATFORM} + '.zip', ${env:APPVEYOR_BUILD_FOLDER} + '\..\php-dev.zip') - 7z.exe x php-dev.zip | FIND /V "ing " - - mv php-%PHP_VERSION%-devel-VC11-%PLATFORM% php-devpack + - mv php-%PHP_VERSION%-devel-VC%PHP_VC%-%PLATFORM% php-devpack # ================================================== - echo Enable Zephir Parser # ================================================== @@ -70,8 +96,9 @@ install: - echo Building PHP [%PHP_VERSION%] # ================================================== - '%PHP_SDK%\bin\phpsdk_setvars' + - '"%VSCOMNTOOLS%\VsDevCmd" %PLATFORM%' + - vcvarsall %ARCH% - 'cd %APPVEYOR_BUILD_FOLDER%\..\php' - - '"%VS110COMNTOOLS%\VsDevCmd" %PLATFORM%' - 'echo extension_dir=%APPVEYOR_BUILD_FOLDER%\..\php\ext > php.ini' - 'echo extension=php_zephir_parser.dll >> php.ini' - 'echo extension=php_curl.dll >> php.ini' @@ -89,10 +116,10 @@ install: - echo Setting up the php_imagick # ================================================== - mkdir c:\ImageMagick && cd c:\ImageMagick - - ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/pecl/deps/ImageMagick-6.9.3-7-vc11-x86.zip', 'c:\ImageMagick\ImageMagick.zip') + - ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/pecl/deps/ImageMagick-' + ${env:IMAGEMAGICK_VERSION} + '-vc' + ${env:PHP_VC} + '-' + ${env:PLATFORM} + '.zip', 'c:\ImageMagick\ImageMagick.zip') - 7z.exe x ImageMagick.zip | FIND /V "ing " - mkdir c:\php_imagick && cd c:\php_imagick - - ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/pecl/releases/imagick/3.4.3rc1/php_imagick-3.4.3rc1-5.6-ts-vc11-x86.zip', 'c:\php_imagick\php_imagick.zip') + - ps: (new-object net.webclient).DownloadFile($env:IMAGICK_DOWNLOAD_URL, 'c:\php_imagick\php_imagick.zip') - 7z.exe x php_imagick.zip | FIND /V "ing " # ================================================== - echo Download tests dependencies... @@ -128,7 +155,3 @@ on_failure : IF (Test-Path -Path compile.log) { type compile.log } - - IF (Test-Path -Path configure.js) { - type configure.js - }