version: 0.1.{build}

environment:
  matrix:
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
      COMPILER: VS_143
      COMPILER_FRIENDLY: vs2022
      GENERATOR: "Visual Studio 17 2022"
      CMAKE_COMMAND: cmake
      CMAKE_OPTION_LIBS: -DARCHITECTURE=Win32
      CMAKE_OPTION_GENERATE: "-A Win32"
      CMAKE_OPTION_BUILD: --config Release
      BUILD_DIR: build
      APPVEYOR_SAVE_CACHE_ON_ERROR: true
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
      COMPILER: VS_142
      COMPILER_FRIENDLY: vs2019
      GENERATOR: "Visual Studio 16 2019"
      CMAKE_COMMAND: cmake
      CMAKE_OPTION_LIBS: -DARCHITECTURE=Win32
      CMAKE_OPTION_GENERATE: "-A Win32"
      CMAKE_OPTION_BUILD: --config Release
      BUILD_DIR: build
      APPVEYOR_SAVE_CACHE_ON_ERROR: true
      #APPVEYOR_CACHE_SKIP_RESTORE: true
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
      COMPILER: VS_142_x64
      COMPILER_FRIENDLY: vs2019_x64
      GENERATOR: "Visual Studio 16 2019"
      CMAKE_COMMAND: cmake
      CMAKE_OPTION_LIBS: -DARCHITECTURE=x64
      CMAKE_OPTION_GENERATE: "-A x64"
      CMAKE_OPTION_BUILD: --config Release
      BUILD_DIR: build
      APPVEYOR_SAVE_CACHE_ON_ERROR: true
      #APPVEYOR_CACHE_SKIP_RESTORE: true
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
      COMPILER: VS_90
      COMPILER_FRIENDLY: vs2008
      GENERATOR: "Visual Studio 9 2008"
      CMAKE_COMMAND: cmake
      CMAKE_OPTION_LIBS: -DARCHITECTURE=Win32
      CMAKE_OPTION_GENERATE: "-A Win32"
      CMAKE_OPTION_BUILD: --config Release
      BUILD_DIR: build
      APPVEYOR_SAVE_CACHE_ON_ERROR: true
      #APPVEYOR_CACHE_SKIP_RESTORE: true
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
      COMPILER: mingw
      COMPILER_FRIENDLY: mingw_gcc_win32
      GENERATOR: "Unix Makefiles"
      CMAKE_COMMAND: cmake
      CMAKE_OPTION_LIBS:
      CMAKE_OPTION_GENERATE: -DCMAKE_BUILD_TYPE=Release
      CMAKE_OPTION_BUILD:
      BUILD_DIR: build
      MINGW_CC: gcc
      MINGW_CXX: g++
      APPVEYOR_SAVE_CACHE_ON_ERROR: true
      #APPVEYOR_CACHE_SKIP_RESTORE: true
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
      COMPILER: mingw_x64
      COMPILER_FRIENDLY: mingw_gcc_x64
      GENERATOR: "Unix Makefiles"
      CMAKE_COMMAND: cmake
      CMAKE_OPTION_LIBS:
      CMAKE_OPTION_GENERATE: -DCMAKE_BUILD_TYPE=Release
      CMAKE_OPTION_BUILD:
      BUILD_DIR: build
      MINGW_CC: gcc
      MINGW_CXX: g++
      APPVEYOR_SAVE_CACHE_ON_ERROR: true
      #APPVEYOR_CACHE_SKIP_RESTORE: true
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
      COMPILER: mingw
      COMPILER_FRIENDLY: mingw_clang_win32
      GENERATOR: "Unix Makefiles"
      CMAKE_COMMAND: cmake
      CMAKE_OPTION_LIBS:
      CMAKE_OPTION_GENERATE: -DCMAKE_BUILD_TYPE=Release
      CMAKE_OPTION_BUILD:
      BUILD_DIR: build
      MINGW_CC: clang
      MINGW_CXX: clang++
      APPVEYOR_SAVE_CACHE_ON_ERROR: true
      #APPVEYOR_CACHE_SKIP_RESTORE: true
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
      COMPILER: mingw_x64
      COMPILER_FRIENDLY: mingw_clang_x64
      GENERATOR: "Unix Makefiles"
      CMAKE_COMMAND: cmake
      CMAKE_OPTION_LIBS:
      CMAKE_OPTION_GENERATE: -DCMAKE_BUILD_TYPE=Release
      CMAKE_OPTION_BUILD:
      BUILD_DIR: build
      MINGW_CC: clang
      MINGW_CXX: clang++
      APPVEYOR_SAVE_CACHE_ON_ERROR: true
      #APPVEYOR_CACHE_SKIP_RESTORE: true

build: off

build_script:
  - call ci_scripts\build_appveyor.bat

cache:
  - libs
  - buildtools

artifacts:
  - path: build\%ZIP_FILE%
  - path: build\%SETUP_FILE%.exe
  - path: build\buildinfo.txt

on_success:
  - ci_scripts\notify.bat success
on_failure:
  - ci_scripts\notify.bat failure
