#**************************************************************************
#*                                                                        *
#*                                 OCaml                                  *
#*                                                                        *
#*                         Christophe Troestler                           *
#*                                                                        *
#*   Copyright 2015 Christophe Troestler                                  *
#*                                                                        *
#*   All rights reserved.  This file is distributed under the terms of    *
#*   the GNU Lesser General Public License version 2.1, with the          *
#*   special exception on linking described in the file LICENSE.          *
#*                                                                        *
#**************************************************************************

branches:
  only:
    - /4\.*/
    - /5\.*/
    - trunk

# Compile the 64 bits version
platform:
  - x64

image: Visual Studio 2022

# Do a shallow clone of the repo to speed up the build
clone_depth: 1

environment:
  global:
    CYG_ROOT: C:/cygwin64
    CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
    CYG_CACHE: C:/cygwin64/var/cache/setup
    FLEXDLL_VERSION: 0.43
    OCAMLRUNPARAM: v=0,b
    FORCE_CYGWIN_UPGRADE: 0
    BUILD_MODE: world.opt
    # Fully print commands executed by Make
    # MAKEFLAGS: V=1
  matrix:
    - PORT: mingw64
      BOOTSTRAP_FLEXDLL: true
# OCaml 5.0 does not yet support MSVC
#    - PORT: msvc64
#      BOOTSTRAP_FLEXDLL: false
#      BUILD_MODE: steps
#    - PORT: msvc32
#      BOOTSTRAP_FLEXDLL: false
#      BUILD_MODE: C
#      SDK: |-
#        "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86

matrix:
  fast_finish: true

cache:
  - C:\cygwin64\var\cache\setup
  - C:\projects\cache

install:
# This is a hangover from monitoring effects of MPR#7452
  - wmic cpu get name
  - call "%APPVEYOR_BUILD_FOLDER%\tools\ci\appveyor\appveyor_build.cmd" install

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

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