version: '2.1.{build}'

# branches to build
branches:
  # whitelist
  only:
    - master

image:
#- Visual Studio 2015
- Visual Studio 2017

configuration:
- Debug
- Release

platform:
- Win32
- x64

environment:
  matrix:
  - cmake_args: 
  - cmake_args: -D CMAKE_SYSTEM_NAME=WindowsStore -D CMAKE_SYSTEM_VERSION=10.0

# clone directory
clone_folder: c:\projects\DiligentCore

install:
  # Install a recent CMake
  - set CMAKE_URL="https://cmake.org/files/v3.10/cmake-3.10.1-win64-x64.zip"
  - appveyor DownloadFile %CMAKE_URL% -FileName cmake.zip
  - 7z x cmake.zip -oC:\projects\deps > nul
  - move C:\projects\deps\cmake-* C:\projects\deps\cmake # Move to a version-agnostic directory
  - set PATH=C:\projects\deps\cmake\bin;%PATH%
  - cmake --version
  - echo %PLATFORM%
  - if "%PLATFORM%"=="x64" ( set generator="Visual Studio 15 2017 Win64" ) else ( set generator="Visual Studio 15 2017" )
  
before_build:
  - cd c:\projects\DiligentCore
  - echo %generator%
  - echo %cmake_args%
  - cmake %cmake_args% -H. -B./cmk_build -G %generator%

build:
  project: c:\projects\DiligentCore\cmk_build\Project.sln
  verbosity: minimal
  parallel: true
