<commit_before>version: 1.0.{build}

image:
  - Visual Studio 2017

cache:
  - C:\sdl_root
  - '%LOCALAPPDATA%\pip\Cache'

configuration:
  - Release

environment:
  PYTHON: "C:\\Python27"
  QTDIR: "C:\\Qt\\5.10.1\\msvc2017_64"

install:
  - cmd: git submodule update --init --recursive
  - cmd: set PATH=%PATH%;%QTDIR%;%QTDIR%/bin;%PYTHON%/Scripts/
  - cmd: dir %QTDIR%
  - cmd: dir %QTDIR%\\lib\\cmake
  # Conan
  - cmd: pip.exe install conan --upgrade
  - cmd: pip.exe install conan_package_tools
  - cmd: refreshenv
  - cmd: conan user # It creates the conan data directory
  # SDL2
  - ps: |
      $SDL_VERSION = "2.0.4"
      $SDL_PREFIX = "C:\sdl_root\SDL2-$SDL_VERSION"
      if (!(Test-Path -Path $SDL_PREFIX)) {
        Start-FileDownload https://libsdl.org/release/SDL2-devel-$SDL_VERSION-VC.zip
        7z x SDL2-devel-$SDL_VERSION-VC.zip -oC:\sdl_root\
      }
      $env:SDL2_INCLUDE_DIR = "$SDL_PREFIX\include"
      $env:SDL2_LIBRARY = "$SDL_PREFIX\lib"
      $env:SDL2_PATH = "$SDL_PREFIX"

before_build:
  - cmd: conan remote add yage https://api.bintray.com/conan/bentoudev/yage
  - cmd: conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
  - msbuild /version
  - mkdir Build && cd Build
  - cmake -DSDL2_PATH=%SDL2_PATH% ..

build:
  project: C:\projects\yage\Build\ALL_BUILD.vcxproj
  verbosity: minimal
  parallel: true

test_script:
  - cmd: C:\projects\yage\Build\Source\Core\Release\CoreTests.exe -r junit > CoreTests.xml
  - cmd: C:\projects\yage\Build\Source\Utils\Release\UtilsTests.exe -r junit > UtilsTests.xml
on_success:
  - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\CoreTests.xml))
  - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\UtilsTests.xml))
<commit_msg>Qt prefix as cmake param<commit_after>version: 1.0.{build}

image:
  - Visual Studio 2017

cache:
  - C:\sdl_root
  - '%LOCALAPPDATA%\pip\Cache'

configuration:
  - Release

environment:
  PYTHON: "C:\\Python27"
  QTDIR: "C:\\Qt\\5.10.1\\msvc2017_64\\"

install:
  - cmd: git submodule update --init --recursive
  - cmd: set PATH=%PATH%;%QTDIR%;%QTDIR%\\bin;%PYTHON%/Scripts/
  - cmd: dir %QTDIR%
  - cmd: dir %QTDIR%\lib\\cmake
  # Conan
  - cmd: pip.exe install conan --upgrade
  - cmd: pip.exe install conan_package_tools
  - cmd: refreshenv
  - cmd: conan user # It creates the conan data directory
  # SDL2
  - ps: |
      $SDL_VERSION = "2.0.4"
      $SDL_PREFIX = "C:\sdl_root\SDL2-$SDL_VERSION"
      if (!(Test-Path -Path $SDL_PREFIX)) {
        Start-FileDownload https://libsdl.org/release/SDL2-devel-$SDL_VERSION-VC.zip
        7z x SDL2-devel-$SDL_VERSION-VC.zip -oC:\sdl_root\
      }
      $env:SDL2_INCLUDE_DIR = "$SDL_PREFIX\include"
      $env:SDL2_LIBRARY = "$SDL_PREFIX\lib"
      $env:SDL2_PATH = "$SDL_PREFIX"

before_build:
  - cmd: conan remote add yage https://api.bintray.com/conan/bentoudev/yage
  - cmd: conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
  - msbuild /version
  - mkdir Build && cd Build
  - cmake -DSDL2_PATH=%SDL2_PATH% -DCMAKE_PREFIX_PATH=%QTDIR% ..

build:
  project: C:\projects\yage\Build\ALL_BUILD.vcxproj
  verbosity: minimal
  parallel: true

test_script:
  - cmd: C:\projects\yage\Build\Source\Core\Release\CoreTests.exe -r junit > CoreTests.xml
  - cmd: C:\projects\yage\Build\Source\Utils\Release\UtilsTests.exe -r junit > UtilsTests.xml
on_success:
  - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\CoreTests.xml))
  - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\UtilsTests.xml))

{'fraction_non_alphanumeric': 0.15322376738305943, 'fraction_numerical': 0.015676359039190898, 'mean_word_length': 2.9679037111334003, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1618055', 'n_tokens_mistral': 1670, 'n_tokens_neox': 1504, 'n_words': 255}