# Copyright 2016, 2017 Peter Dimov
# Copyright 2017-2018 Kohei Takahashi
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)

version: 1.0.{build}-{branch}

shallow_clone: true

environment:
  matrix:
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
      TOOLSET: msvc-9.0
      ADDRMD: 32
      CXXSTD: latest # fake
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
      TOOLSET: msvc-10.0
      ADDRMD: 32
      CXXSTD: latest # fake
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
      TOOLSET: msvc-11.0
      ADDRMD: 32
      CXXSTD: latest # fake
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
      TOOLSET: msvc-12.0
      ADDRMD: 32
      CXXSTD: latest # fake
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
      TOOLSET: msvc-14.0
      CXXSTD: 14
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
      TOOLSET: msvc-14.0
      CXXSTD: latest
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
      TOOLSET: msvc-14.1
      CXXSTD: 14
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
      TOOLSET: msvc-14.1
      CXXSTD: 17
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
      TOOLSET: msvc-14.1
      CXXSTD: latest
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
      TOOLSET: clang-win
      CXXSTD: 14
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
      TOOLSET: clang-win
      CXXSTD: 17

install:
  - set BOOST_BRANCH=develop
  - if "%APPVEYOR_REPO_BRANCH%" == "master" set BOOST_BRANCH=master
  - cd ..
  - git clone --depth 1 -b %BOOST_BRANCH% https://github.com/boostorg/boost.git boost-root
  - cd boost-root

  - git submodule init libs/array
  - git submodule init libs/assert
  - git submodule init libs/bind
  - git submodule init libs/concept_check
  - git submodule init libs/config
  - git submodule init libs/container_hash
  - git submodule init libs/conversion
  - git submodule init libs/core
  - git submodule init libs/detail
  - git submodule init libs/function
  - git submodule init libs/function_types
  - git submodule init libs/functional
  - git submodule init libs/integer
  - git submodule init libs/iterator
  - git submodule init libs/lambda
  - git submodule init libs/move
  - git submodule init libs/mpl
  - git submodule init libs/optional
  - git submodule init libs/predef
  - git submodule init libs/preprocessor
  - git submodule init libs/smart_ptr
  - git submodule init libs/static_assert
  - git submodule init libs/throw_exception
  - git submodule init libs/tuple
  - git submodule init libs/type_index
  - git submodule init libs/type_traits
  - git submodule init libs/typeof
  - git submodule init libs/utility
  - git submodule init libs/describe
  - git submodule init libs/mp11

  - git submodule init libs/headers tools/boost_install tools/build
  - git submodule update
  - xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\fusion
  - cmd /c bootstrap
  - b2 headers

build: off

test_script:
  - if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD%
  - b2 -j%NUMBER_OF_PROCESSORS% --hash libs/fusion/test toolset=%TOOLSET% cxxstd=%CXXSTD% %ADDRMD%
