platform:
    - x64

image: Visual Studio 2019

environment:
  global:
    CYG_ROOT: cygwin64
    CYG_ARCH: x86_64
    OCAML_PORT:
    CYG_CACHE: C:/cygwin/var/cache/setup
    CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
    DEP_MODE: lib-ext
    # This should be identical to the value in .travis.yml
    OPAM_REPO_SHA: 38e8f54c584fa3cfe779890f7a56fe88ee38be78
    OPAM_TEST_REPO_SHA: 38e8f54c584fa3cfe779890f7a56fe88ee38be78
  matrix:
    - CYG_ROOT: cygwin
      CYG_ARCH: x86
    - CYG_ROOT: cygwin64
      CYG_ARCH: x86_64
      DEP_MODE: lib-pkg
    - appveyor_build_worker_image: Visual Studio 2017
      OCAML_PORT: msvc
      DEP_MODE: lib-pkg
      GIT_FOR_WINDOWS: 1
    - appveyor_build_worker_image: Visual Studio 2017
      OCAML_PORT: msvc64
    - OCAML_PORT: mingw
    - OCAML_PORT: mingw64
      DEP_MODE: lib-pkg
      GIT_FOR_WINDOWS: 1

cache:
  - C:\projects\opam\bootstrap
  - C:\projects\opam\src_ext\archives

install:
  - call "%APPVEYOR_BUILD_FOLDER%\appveyor_build.cmd" install

build_script:
  - call "%APPVEYOR_BUILD_FOLDER%\appveyor_build.cmd" build

test_script:
  - call "%APPVEYOR_BUILD_FOLDER%\appveyor_build.cmd" test

# Uncomment this to enable Remote Desktop on the build worker at the end of the
# build. The worker is available for the remainder of the allocated hour.
#on_finish:
#    - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
