platform: x64
configuration: Release
environment:
  CS_APIKEY:
    secure: XiSyqXBlbnIqawfinZqXimatuEdpYsI38+HK2TgvuUGHQEoeFHA62700/EhFJ4M1
image:
 - Visual Studio 2017
 - Visual Studio 2013
install:
 - cmd: choco install swig -y --version 3.0.12 & exit 0
 - cmd: cd %APPVEYOR_BUILD_FOLDER%
 - cmd: git submodule update --init --recursive
build_script:
 - set PATH=C:\Qt\5.12\msvc2017_64\bin;%PATH%
 - cmake -P ci-build.cmake
 - cmake --build build --config RelWithDebInfo --target INSTALL
test_script:
 - set PATH=%PATH%;build\gtest\lib
 - IF "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" build\bin\RelWithDebInfo\Test_Ogre.exe --gtest_filter=-MeshWithoutIndexDataTests*
cache:
- ogredeps -> CMake/Dependencies.cmake
branches:
  only:
    - master
    - stable
after_build:
  - IF NOT "%APPVEYOR_REPO_TAG%" == "true" set APPVEYOR_REPO_TAG_NAME=master
  - 7z a ogre-sdk-%APPVEYOR_REPO_TAG_NAME%-vc15-x64.zip ./build/sdk/*
  - pip install --upgrade cloudsmith-cli
  - IF "%APPVEYOR_PULL_REQUEST_NUMBER%" == "" IF "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" cloudsmith push raw ogrecave/ogre ogre-sdk-master-vc15-x64.zip --republish -k %CS_APIKEY%
artifacts:
  - path: ogre-sdk-master-vc15-x64.zip
    name: ogre-sdk-master-vc15-x64
