version: "{build}"

shallow_clone: true

environment:
  matrix:
    - job_name: Visual Studio 2022 64-bit
      visualcpp: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat
      appveyor_build_worker_image: Visual Studio 2022

    - job_name: Visual Studio 2019 64-bit
      visualcpp: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat
      appveyor_build_worker_image: Visual Studio 2019

    - job_name: Visual Studio 2019 32-bit
      visualcpp: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat
      appveyor_build_worker_image: Visual Studio 2019

    - job_name: Visual Studio 2017 64-bit
      visualcpp: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat
      appveyor_build_worker_image: Visual Studio 2017

    - job_name: Visual Studio 2017 32-bit
      visualcpp: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat
      appveyor_build_worker_image: Visual Studio 2017

    - job_name: Visual Studio 2015 64-bit
      visualcpp: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
      appveyor_build_worker_image: Visual Studio 2015
      machine: x86_amd64

    - job_name: Visual Studio 2015 32-bit
      visualcpp: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
      appveyor_build_worker_image: Visual Studio 2015
      machine: x86

init:
  - call "%visualcpp%" %machine%
  # For using RubyInstaller's Ruby 2.6 64-bit
  # 2.6 is the highest supported Ruby version across all historical
  # Visual Studio AppVeyor images. Ruby 2.7 is only on the 2019 image.
  - set PATH=C:\Ruby26-x64\bin;%PATH%
  - ruby --version

build_script:
  - set MRUBY_CONFIG=ci/msvc
  - rake -m test:run:serial
