Skip to content

Commit

Permalink
Add appveyor.yml for C.I. on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Aug 18, 2015
1 parent d6d93dd commit ccc91e9
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .travis.yml
Expand Up @@ -9,16 +9,7 @@ addons:

matrix:
include:
- php: hhvm
- php: 5.3.3
- php: 5.3
- php: 5.4
- php: 5.5
- php: 5.6
env: deps=low
- php: 5.6
env: deps=high
- php: nightly
fast_finish: true

services: mongodb
Expand All @@ -37,8 +28,8 @@ before_install:
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then (pecl install -f memcached-2.1.0 && echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini) || echo "Let's continue without memcache extension"; fi;
- if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then php -i; fi;
# Build a standalone phpunit without symfony/yaml and that works around https://github.com/sebastianbergmann/phpunit-mock-objects/issues/223
- (mkdir phpunit && cd phpunit && wget https://github.com/sebastianbergmann/phpunit/archive/4.7.zip && unzip 4.7.zip && cd phpunit-4.7 && composer remove --no-update symfony/yaml && composer require --prefer-source phpunit/phpunit-mock-objects '2.3.0')
- export PHPUNIT="$(readlink -f ./phpunit/phpunit-4.7/phpunit) --colors=always"
- (mkdir phpunit && cd phpunit && wget https://github.com/sebastianbergmann/phpunit/archive/4.8.zip && unzip 4.8.zip && cd phpunit-4.8 && composer remove --no-update symfony/yaml && composer require --prefer-source phpunit/phpunit-mock-objects '2.3.0')
- export PHPUNIT="$(readlink -f ./phpunit/phpunit-4.8/phpunit) --colors=always"
# Set the COMPOSER_ROOT_VERSION to the right version according to the branch being built
- if [ "$TRAVIS_BRANCH" = "master" ]; then export COMPOSER_ROOT_VERSION=dev-master; else export COMPOSER_ROOT_VERSION="$TRAVIS_BRANCH".x-dev; fi;

Expand Down
41 changes: 41 additions & 0 deletions appveyor.yml
@@ -0,0 +1,41 @@
build: false
shallow_clone: false
platform: 'x86'
clone_folder: c:\projects\symfony

environment:
global:
PHP: C:/PHP
CYG_ROOT: C:/cygwin
CYG_CACHE: C:/cygwin/var/cache/setup
CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/

init:
- SET PATH=C:\php\;%PATH%

install:
- cd c:\
- ps: Start-FileDownload 'http://ci.cakephp.org/php.zip'
- 7z x php.zip -oc:\php
- cd c:\php
- copy php.ini-production php.ini
- echo date.timezone="UTC" >> php.ini
- echo extension_dir=ext >> php.ini
- echo extension=php_openssl.dll >> php.ini
- echo extension=php_intl.dll >> php.ini
- echo extension=php_mbstring.dll >> php.ini
- echo extension=php_fileinfo.dll >> php.ini
- php -i
- ps: Start-FileDownload 'https://getcomposer.org/composer.phar'
- cd C:\projects\symfony
- php c:\php\composer.phar install --prefer-dist --no-progress
- mkdir phpunit
- cd phpunit
- ps: Start-FileDownload 'https://github.com/sebastianbergmann/phpunit/archive/4.8.zip'
- 7z x 4.8.zip
- cd phpunit-4.8
- php c:\php\composer.phar remove --no-update symfony/yaml
- php c:\php\composer.phar install --prefer-dist --no-progress

test_script:
- '%CYG_ROOT%/bin/bash -lc "cd /cygdrive/c/projects/symfony && find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf %h\\n"'

0 comments on commit ccc91e9

Please sign in to comment.