version: 1.0-{build}

os:
  - Visual Studio 2015

before_build:
  - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64

build_script:
  - mkdir build
  - cd build
  - ..\nmake-dll.bat
  - ..\nmake-lib.bat

after_build:
  - mkdir keystone-windows-latest
  - copy llvm\bin\keystone.dll keystone-windows-latest
  - copy llvm\lib\keystone.lib keystone-windows-latest
  - copy kstool\kstool.exe keystone-windows-latest
  - 7z a keystone-windows-latest.zip keystone-windows-latest\*

artifacts:
  - path: build\keystone-windows-latest.zip
    name: All Windows binaries

  - path: build\llvm\bin\keystone.dll
    name: keystone.dll

  - path: build\llvm\lib\keystone.lib
    name: keystone.lib

  - path: build\kstool\kstool.exe
    name: kstool.exe
