<commit_before># Based on igbinary and php-ast's appveyor config.
# This tests against the latest stable minor version of PHP 7 (Currently 7.1)
# The project name is the same as the build id used, e.g. https://www.appveyor.com/docs/environment-variables/

version: '{branch}.{build}'
clone_folder: C:\projects\phan
# Don't include full git history
clone_depth: 1
# Test 32-bit builds
platform: x86
environment:
  matrix:
    - PHP_EXT_VERSION: '7.1'
      PHP_VERSION: '7.1.14'
      VC_VERSION: 14
    - PHP_EXT_VERSION: '7.2'
      PHP_VERSION: '7.2.2'
      VC_VERSION: 15

branches:
  only:
    - master
    - 0.8
    - 0.9
    - php72

install:
- cmd: choco feature enable -n=allowGlobalConfirmation
- cmd: mkdir %APPVEYOR_BUILD_FOLDER%\bin
build_script:
- cmd: >-
    mkdir C:\projects\php

    cd C:\projects\php

    SET PHP_ZIP_BASENAME=php-%PHP_VERSION%-nts-Win32-VC%VC_VERSION%-x86.zip

    appveyor DownloadFile http://windows.php.net/downloads/releases/archives/%PHP_ZIP_BASENAME% || appveyor DownloadFile http://windows.php.net/downloads/releases/%PHP_ZIP_BASENAME%

    7z x -y %PHP_ZIP_BASENAME%

    del /Q *.zip

    cd C:\projects\php\ext

    SET AST_ZIP_BASENAME=php_ast-0.1.6-%PHP_EXT_VERSION%-nts-vc%VC_VERSION%-x86.zip

    appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/ast/0.1.6/%AST_ZIP_BASENAME%

    7z x %AST_ZIP_BASENAME% php_ast.dll -y >nul

    cd C:\projects\php

    echo [PHP] > php.ini

    echo extension_dir = "ext" >> php.ini

    echo extension=php_ast.dll >> php.ini

    echo extension=php_curl.dll >> php.ini

    echo extension=php_intl.dll >> php.ini

    echo extension=php_mbstring.dll >> php.ini

    echo extension=php_openssl.dll >> php.ini

    echo extension=php_soap.dll >> php.ini

    SET PATH=c:\projects\php;%PATH%

    echo %PATH%

    php -v

    php -m

    cd C:\projects\phan

    appveyor DownloadFile https://getcomposer.org/composer.phar

test_script:
- cmd: cd C:\projects\phan
- cmd: php composer.phar install --classmap-authoritative --prefer-dist
- cmd: php phan
- cmd: .\vendor\bin\phpunit --verbose
# Verify that a phar can be built and executed under windows
- cmd: mkdir build
- cmd: php -d phar.readonly=0 internal/package.php
- cmd: php build/phan.phar --quick<commit_msg>Use curl -fsS instead of appveyor DownloadFile<commit_after># Based on igbinary and php-ast's appveyor config.
# This tests against the latest stable minor version of PHP 7 (Currently 7.1)
# The project name is the same as the build id used, e.g. https://www.appveyor.com/docs/environment-variables/

version: '{branch}.{build}'
clone_folder: C:\projects\phan
# Don't include full git history
clone_depth: 1
# Test 32-bit builds
platform: x86
environment:
  matrix:
    - PHP_EXT_VERSION: '7.1'
      PHP_VERSION: '7.1.14'
      VC_VERSION: 14
    - PHP_EXT_VERSION: '7.2'
      PHP_VERSION: '7.2.2'
      VC_VERSION: 15

branches:
  only:
    - master
    - 0.8
    - 0.9
    - php72

install:
- cmd: choco feature enable -n=allowGlobalConfirmation
- cmd: mkdir %APPVEYOR_BUILD_FOLDER%\bin
build_script:
- cmd: >-
    mkdir C:\projects\php

    cd C:\projects\php

    SET PHP_ZIP_BASENAME=php-%PHP_VERSION%-nts-Win32-VC%VC_VERSION%-x86.zip

    curl -fsS http://windows.php.net/downloads/releases/archives/%PHP_ZIP_BASENAME% -o %PHP_ZIP_BASENAME% || curl -fsS http://windows.php.net/downloads/releases/%PHP_ZIP_BASENAME% -o %PHP_ZIP_BASENAME%

    7z x -y %PHP_ZIP_BASENAME%

    del /Q *.zip

    cd C:\projects\php\ext

    SET AST_ZIP_BASENAME=php_ast-0.1.6-%PHP_EXT_VERSION%-nts-vc%VC_VERSION%-x86.zip

    curl -fsS http://windows.php.net/downloads/pecl/releases/ast/0.1.6/%AST_ZIP_BASENAME% -o %AST_ZIP_BASENAME%

    7z x %AST_ZIP_BASENAME% php_ast.dll -y >nul

    cd C:\projects\php

    echo [PHP] > php.ini

    echo extension_dir = "ext" >> php.ini

    echo extension=php_ast.dll >> php.ini

    echo extension=php_curl.dll >> php.ini

    echo extension=php_intl.dll >> php.ini

    echo extension=php_mbstring.dll >> php.ini

    echo extension=php_openssl.dll >> php.ini

    echo extension=php_soap.dll >> php.ini

    SET PATH=c:\projects\php;%PATH%

    echo %PATH%

    php -v

    php -m

    curl -fsS https://getcomposer.org/composer.phar -o C:\projects\phan\composer.phar

test_script:
- cmd: cd C:\projects\phan
- cmd: php composer.phar install --classmap-authoritative --prefer-dist
- cmd: php phan
- cmd: .\vendor\bin\phpunit --verbose
# Verify that a phar can be built and executed under windows
- cmd: mkdir build
- cmd: php -d phar.readonly=0 internal/package.php
- cmd: php build/phan.phar --quick
{'fraction_non_alphanumeric': 0.12369565217391304, 'fraction_numerical': 0.019130434782608695, 'mean_word_length': 3.1117068811438786, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 37, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1487543', 'n_tokens_mistral': 1865, 'n_tokens_neox': 1657, 'n_words': 395}