<commit_before># version format
version: 1.4.{build}-{branch}

os: Visual Studio 2015

platform:
  - x64

environment:
  QTDIR: C:\Qt\5.6\msvc2015_64
  QT_FATAL_WARNINGS: true
  matrix:
    - XPIKS_BINARY: true
    - CORE_TESTS: true
    - INTEGRATION_TESTS: true
    - UI_TESTS: true

branches:
  # blacklist
  except:
    - gh-pages

configuration:
  - debug

# - release

# Do not build on tags (GitHub only)
skip_tags: false

skip_commits:
  message: /.*\[ci skip\]/       # Regex for matching commit message

# clone directory
clone_folder: c:\projects\xpiks

# set clone depth
clone_depth: 3                      # clone entire repository history if not defined

matrix:
  fast_finish: true
  allow_failures:
    - configuration: release

init:
  - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

install:
  - if %QTDIR:_64=%==%QTDIR% ( set ARCH=x86 ) else set ARCH=x64
  - git clone --depth=2 https://bitbucket.org/ribtoks/xpiks-deps.git c:\projects\xpiks-deps
  - cmd: 'cd c:\projects\xpiks-deps'
  - cmd: 'cd c:\projects\xpiks'
  - git submodule update --init --recursive
  - cmd: set PATH=%PATH%;%QTDIR%\bin
  - qmake -v

before_build:
  - cmd: 'echo %cd%'
  - cmd: 'xcopy /s c:\projects\xpiks-deps\windows-libs\%configuration%-x64 c:\projects\xpiks\libs'
  - cmd: 'xcopy /s c:\projects\xpiks-deps\windows-libs\ffmpeg-x64\%configuration% c:\projects\xpiks\libs'
  - cmd: 'move c:\projects\xpiks-deps\hunspell-1.6.0 c:\projects\xpiks\vendors'
  - cmd: 'move c:\projects\xpiks-deps\zlib-1.2.11 c:\projects\xpiks\vendors'
  - cmd: 'cd c:\projects\xpiks'
  - cmd: 'ren vendors\tiny-aes\aes.c aes.cpp'
  - cmd: 'copy libs\mman.* vendors\cpp-libface\libs'
  - cmd: 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %ARCH%'

build_script:
  - cmd: 'echo %cd%'
  - if not defined UI_TESTS cd vendors
  - if not defined UI_TESTS cd cpp-libface\libface-project
  - if not defined UI_TESTS qmake "CONFIG+=%configuration%" libface.pro
  - if not defined UI_TESTS nmake.exe
  - if not defined UI_TESTS copy %configuration%\face.* ..\..\..\libs
  - if not defined UI_TESTS cd ..\..
  - if not defined UI_TESTS cd ssdll\src\ssdll
  - if not defined UI_TESTS qmake "CONFIG+=%configuration% appveyor" ssdll.pro
  - if not defined UI_TESTS nmake.exe
  - if not defined UI_TESTS copy %configuration%\ssdll.* ..\..\..\..\libs
  - if not defined UI_TESTS cd ..\..\..\..\src
  - if defined UI_TESTS cd src
  - if defined XPIKS_BINARY cd xpiks-qt
  - if defined CORE_TESTS cd xpiks-tests\xpiks-tests-core
  - if defined INTEGRATION_TESTS cd xpiks-tests\xpiks-tests-integration
  - if defined UI_TESTS qmake xpiks-tests\xpiks-tests-ui
  - if defined XPIKS_BINARY qmake "CONFIG+=%configuration% appveyor" xpiks-qt.pro
  - if defined CORE_TESTS qmake "CONFIG+=%configuration% appveyor" xpiks-tests-core.pro
  - if defined INTEGRATION_TESTS qmake "CONFIG+=%configuration% appveyor" xpiks-tests-integration.pro
  - if defined UI_TESTS qmake "CONFIG+=%configuration% appveyor" xpiks-tests-ui.pro
  - nmake.exe

after_build:
  - cmd: 'echo %cd%'
  - if defined XPIKS_BINARY cd %configuration%
  - if defined XPIKS_BINARY windeployqt.exe --debug --qmldir=../../xpiks-qt/CollapserTabs/ --qmldir=../../xpiks-qt/Components/ --qmldir=../../xpiks-qt/Constants/ --qmldir=../../xpiks-qt/Dialogs/ --qmldir=../../xpiks-qt/StackViews/ --qmldir=../../xpiks-qt/StyledControls/ --qmldir=../../xpiks-qt/ xpiks-qt.exe
  - if defined XPIKS_BINARY xcopy /Y /s c:\projects\xpiks\src\xpiks-qt\deps .
  - if defined XPIKS_BINARY copy /Y ..\..\..\libs\libcurl*.dll .
  - if defined XPIKS_BINARY copy /Y ..\..\..\libs\quazip*.dll .
  - if defined XPIKS_BINARY copy /Y ..\..\..\libs\ssdll.dll .
  - if defined XPIKS_BINARY copy /Y ..\..\..\libs\mman.dll .
  - if defined XPIKS_BINARY copy /Y ..\..\..\libs\face.dll .
  - if defined XPIKS_BINARY copy /Y ..\..\..\libs\z.dll .
  - if defined XPIKS_BINARY del *.obj
  - if defined XPIKS_BINARY del *.cpp
  - if defined XPIKS_BINARY cd ..
  - if defined XPIKS_BINARY 7z a xpiks-qt-%configuration%.zip %configuration%
  - if defined XPIKS_BINARY appveyor PushArtifact xpiks-qt-%configuration%.zip

before_test:
  - cmd: 'echo %cd%'
  - if defined CORE_TESTS copy ..\..\..\libs\*.dll .
  - if defined INTEGRATION_TESTS copy ..\..\..\libs\*.dll .

test_script:
  - cmd: 'echo %cd%'
  - if defined CORE_TESTS %configuration%\xpiks-tests-core.exe
  - if defined INTEGRATION_TESTS %configuration%\xpiks-tests-integration.exe

on_failure:
  - ps: Get-ChildItem .\*.dmp | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
  - if defined INTEGRATION_TESTS appveyor PushArtifact %configuration%\xpiks-tests-integration.exe
  - if defined INTEGRATION_TESTS appveyor PushArtifact %configuration%\xpiks-tests-integration.pdb<commit_msg>Fixes for appveyor ui-tests buildscript<commit_after># version format
version: 1.4.{build}-{branch}

os: Visual Studio 2015

platform:
  - x64

environment:
  QTDIR: C:\Qt\5.6\msvc2015_64
  QT_FATAL_WARNINGS: true
  matrix:
    - XPIKS_BINARY: true
    - CORE_TESTS: true
    - INTEGRATION_TESTS: true
    - UI_TESTS: true

branches:
  # blacklist
  except:
    - gh-pages

configuration:
  - debug

# - release

# Do not build on tags (GitHub only)
skip_tags: false

skip_commits:
  message: /.*\[ci skip\]/       # Regex for matching commit message

# clone directory
clone_folder: c:\projects\xpiks

# set clone depth
clone_depth: 3                      # clone entire repository history if not defined

matrix:
  fast_finish: true
  allow_failures:
    - configuration: release

init:
  - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

install:
  - if %QTDIR:_64=%==%QTDIR% ( set ARCH=x86 ) else set ARCH=x64
  - git clone --depth=2 https://bitbucket.org/ribtoks/xpiks-deps.git c:\projects\xpiks-deps
  - cmd: 'cd c:\projects\xpiks-deps'
  - cmd: 'cd c:\projects\xpiks'
  - git submodule update --init --recursive
  - cmd: set PATH=%PATH%;%QTDIR%\bin
  - qmake -v

before_build:
  - cmd: 'echo %cd%'
  - cmd: 'xcopy /s c:\projects\xpiks-deps\windows-libs\%configuration%-x64 c:\projects\xpiks\libs'
  - cmd: 'xcopy /s c:\projects\xpiks-deps\windows-libs\ffmpeg-x64\%configuration% c:\projects\xpiks\libs'
  - cmd: 'move c:\projects\xpiks-deps\hunspell-1.6.0 c:\projects\xpiks\vendors'
  - cmd: 'move c:\projects\xpiks-deps\zlib-1.2.11 c:\projects\xpiks\vendors'
  - cmd: 'cd c:\projects\xpiks'
  - cmd: 'ren vendors\tiny-aes\aes.c aes.cpp'
  - cmd: 'copy libs\mman.* vendors\cpp-libface\libs'
  - cmd: 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %ARCH%'

build_script:
  - cmd: 'echo %cd%'
  - if not defined UI_TESTS cd vendors
  - if not defined UI_TESTS cd cpp-libface\libface-project
  - if not defined UI_TESTS qmake "CONFIG+=%configuration%" libface.pro
  - if not defined UI_TESTS nmake.exe
  - if not defined UI_TESTS copy %configuration%\face.* ..\..\..\libs
  - if not defined UI_TESTS cd ..\..
  - if not defined UI_TESTS cd ssdll\src\ssdll
  - if not defined UI_TESTS qmake "CONFIG+=%configuration% appveyor" ssdll.pro
  - if not defined UI_TESTS nmake.exe
  - if not defined UI_TESTS copy %configuration%\ssdll.* ..\..\..\..\libs
  - if not defined UI_TESTS cd ..\..\..\..\src
  - if defined UI_TESTS cd src
  - if defined XPIKS_BINARY cd xpiks-qt
  - if defined CORE_TESTS cd xpiks-tests\xpiks-tests-core
  - if defined INTEGRATION_TESTS cd xpiks-tests\xpiks-tests-integration
  - if defined UI_TESTS cd xpiks-tests\xpiks-tests-ui
  - if defined XPIKS_BINARY qmake "CONFIG+=%configuration% appveyor" xpiks-qt.pro
  - if defined CORE_TESTS qmake "CONFIG+=%configuration% appveyor" xpiks-tests-core.pro
  - if defined INTEGRATION_TESTS qmake "CONFIG+=%configuration% appveyor" xpiks-tests-integration.pro
  - if defined UI_TESTS qmake "CONFIG+=%configuration% appveyor" xpiks-tests-ui.pro
  - nmake.exe

after_build:
  - cmd: 'echo %cd%'
  - if defined XPIKS_BINARY cd %configuration%
  - if defined XPIKS_BINARY windeployqt.exe --debug --qmldir=../../xpiks-qt/CollapserTabs/ --qmldir=../../xpiks-qt/Components/ --qmldir=../../xpiks-qt/Constants/ --qmldir=../../xpiks-qt/Dialogs/ --qmldir=../../xpiks-qt/StackViews/ --qmldir=../../xpiks-qt/StyledControls/ --qmldir=../../xpiks-qt/ xpiks-qt.exe
  - if defined XPIKS_BINARY xcopy /Y /s c:\projects\xpiks\src\xpiks-qt\deps .
  - if defined XPIKS_BINARY copy /Y ..\..\..\libs\libcurl*.dll .
  - if defined XPIKS_BINARY copy /Y ..\..\..\libs\quazip*.dll .
  - if defined XPIKS_BINARY copy /Y ..\..\..\libs\ssdll.dll .
  - if defined XPIKS_BINARY copy /Y ..\..\..\libs\mman.dll .
  - if defined XPIKS_BINARY copy /Y ..\..\..\libs\face.dll .
  - if defined XPIKS_BINARY copy /Y ..\..\..\libs\z.dll .
  - if defined XPIKS_BINARY del *.obj
  - if defined XPIKS_BINARY del *.cpp
  - if defined XPIKS_BINARY cd ..
  - if defined XPIKS_BINARY 7z a xpiks-qt-%configuration%.zip %configuration%
  - if defined XPIKS_BINARY appveyor PushArtifact xpiks-qt-%configuration%.zip

before_test:
  - cmd: 'echo %cd%'
  - if defined CORE_TESTS copy ..\..\..\libs\*.dll .
  - if defined INTEGRATION_TESTS copy ..\..\..\libs\*.dll .

test_script:
  - cmd: 'echo %cd%'
  - if defined CORE_TESTS %configuration%\xpiks-tests-core.exe
  - if defined INTEGRATION_TESTS %configuration%\xpiks-tests-integration.exe
  - if defined UI_TESTS %configuration%\xpiks-tests-ui.exe

on_failure:
  - ps: Get-ChildItem .\*.dmp | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
  - if defined INTEGRATION_TESTS appveyor PushArtifact %configuration%\xpiks-tests-integration.exe
  - if defined INTEGRATION_TESTS appveyor PushArtifact %configuration%\xpiks-tests-integration.pdb
{'fraction_non_alphanumeric': 0.1502558853633572, 'fraction_numerical': 0.008597748208802457, 'mean_word_length': 3.0077932731747334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5469005', 'n_tokens_mistral': 3969, 'n_tokens_neox': 3706, 'n_words': 831}