version: 3.0.0.{build}

branches:
    except:
        - 26compat
        - gh-pages
        - legacy
        - legacy-1.1-dev

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

clone_folder: c:\build

os: Visual Studio 2015

test: off

build_script:
  - cmd: git clone https://github.com/mongodb/mongo-c-driver.git
  - cmd: cd mongo-c-driver
    # TODO: Update this to our real minimum for the C++11 driver 3.1 release, once known.
  - cmd: git checkout 1.5.0
  - cmd: git submodule init
  - cmd: git submodule update
  - cmd: cd src\libbson
  - cmd: cmake.exe -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=C:\usr
  - cmd: msbuild INSTALL.vcxproj
  - cmd: cd ..\..
  - cmd: cmake.exe -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=C:\usr -DBSON_ROOT_DIR=C:\usr
  - cmd: msbuild INSTALL.vcxproj
  - cmd: cd /d c:\build
  - cmd: cmake.exe -G "Visual Studio 14 2015 Win64" -DLIBBSON_DIR=c:\usr -DLIBMONGOC_DIR=c:\usr -DBSONCXX_POLY_USE_BOOST=1 -DBOOST_ROOT=c:\Libraries\boost_1_59_0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=.\install
  - cmd: msbuild.exe ALL_BUILD.vcxproj /p:Configuration=Release
  - cmd: msbuild.exe INSTALL.vcxproj /p:Configuration=Release
  - cmd: msbuild.exe examples\examples.vcxproj /p:Configuration=Release
