#***************************************************************************
#                                  _   _ ____  _
#  Project                     ___| | | |  _ \| |
#                             / __| | | | |_) | |
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################

# https://ci.appveyor.com/project/curlorg/curl/history
# AppVeyor configuration:
#   https://www.appveyor.com/docs/appveyor-yml/
# AppVeyor worker images:
#   https://www.appveyor.com/docs/windows-images-software/

version: 7.50.0.{build}

environment:
  DO_NOT_TRACK: '1'

  matrix:
    # CMake Visual Studio builds

    - job_name: 'CM VS2022, Release, x64, OpenSSL 3.6, Shared, Build-tests'
      APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
      CMAKE_GENERATOR: 'Visual Studio 17 2022'
      CMAKE_GENERATE: '-A x64 -DCURL_USE_SCHANNEL=OFF -DCURL_USE_OPENSSL=ON'

    - job_name: 'CM VS2022, Release, arm64, Schannel, Static, !DEBUGBUILD, Build-tests'
      APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
      CMAKE_GENERATOR: 'Visual Studio 17 2022'
      CMAKE_GENERATE: '-A ARM64 -DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=OFF'

    - job_name: 'CM VS2010, Debug, x64, Schannel, Shared, Build-tests & examples'
      APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015'
      CMAKE_VERSION: 3.18.4
      CMAKE_SHA256: a932bc0c8ee79f1003204466c525b38a840424d4ae29f9e5fb88959116f2407d
      CMAKE_GENERATOR: 'Visual Studio 10 2010'
      CMAKE_GENERATE: '-A x64'

    - job_name: 'CM VS2012, Release, x86, Schannel, Shared, Build-tests'
      APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015'
      CMAKE_VERSION: 3.21.7
      CMAKE_SHA256: 4c4840e2dc2bf82e8a16081ff506bba54f3a228b91ce36317129fed4035ef2e3
      CMAKE_GENERATOR: 'Visual Studio 11 2012'
      CMAKE_GENERATE: '-A Win32'

    - job_name: 'CM VS2013, Debug, x64, Schannel, Shared'
      APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015'
      CMAKE_VERSION: 3.18.4
      CMAKE_SHA256: a932bc0c8ee79f1003204466c525b38a840424d4ae29f9e5fb88959116f2407d
      CMAKE_GENERATOR: 'Visual Studio 12 2013'
      CMAKE_GENERATE: '-A x64'

    - job_name: 'CM VS2015, Debug, x64, Schannel, Static'
      APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015'
      CMAKE_VERSION: 3.19.8
      CMAKE_SHA256: 2a30877a3d6b50da305b289f4d1c03befdfaeb2edba02a563c681e883d810380
      CMAKE_GENERATOR: 'Visual Studio 14 2015'
      CMAKE_GENERATE: '-A x64 -DBUILD_SHARED_LIBS=OFF'

    - job_name: 'CM VS2017, Debug, x64, Schannel, Shared'
      APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017'
      CMAKE_VERSION: 3.20.6
      CMAKE_SHA256: f240a38c964712aac474644b3ba21bdc2b4e8d5e31179f67bd2e6f45fa349419
      CMAKE_GENERATOR: 'Visual Studio 15 2017'
      CMAKE_GENERATE: '-A x64'

    - job_name: 'CM VS2019, Debug, x64, OpenSSL 3.0 + Schannel, Shared, !verbose, Build-tests'
      APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019'
      CMAKE_GENERATOR: 'Visual Studio 16 2019'
      CMAKE_GENERATE: '-A x64 -DCURL_USE_OPENSSL=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON'

    - job_name: 'CM VS2022, Debug, x64, OpenSSL 3.6 + Schannel, Static, Unicode, Build-tests & examples, clang-cl'
      APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
      CMAKE_GENERATOR: 'Visual Studio 17 2022'
      CMAKE_GENERATE: '-A x64 -T ClangCl -DBUILD_SHARED_LIBS=OFF -DCURL_USE_OPENSSL=ON -DENABLE_UNICODE=ON'

    - job_name: 'CM VS2022, Release, x64, Schannel, Shared, Unicode, !DEBUGBUILD, Build-tests'
      APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
      CMAKE_GENERATOR: 'Visual Studio 17 2022'
      ENABLE_UNICODE: 'ON'
      CMAKE_GENERATE: '-A x64 -DENABLE_UNICODE=ON -DENABLE_DEBUG=OFF'

    - job_name: 'CM VS2022, Debug, x64, !ssl, Static, Build-tests'
      APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
      CMAKE_GENERATOR: 'Visual Studio 17 2022'
      CMAKE_GENERATE: '-A x64 -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=OFF'

    - job_name: 'CM VS2022, Debug, x64, !ssl, Static, HTTP-only, Build-tests'
      APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
      CMAKE_GENERATOR: 'Visual Studio 17 2022'
      CMAKE_GENERATE: '-A x64 -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=OFF -DHTTP_ONLY=ON'

    # VisualStudioSolution builds

    - job_name: 'VisualStudioSolution VS2010, Release, x86, Schannel'
      APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2013'
      PRJ_CFG: 'DLL Release - DLL Windows SSPI - DLL WinIDN'
      PLAT: 'Win32'
      VC_VERSION: VC10

    - job_name: 'VisualStudioSolution VS2013, Debug, x64, Schannel'
      APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015'
      PRJ_CFG: 'DLL Debug - DLL Windows SSPI - DLL WinIDN'
      PLAT: 'x64'
      VC_VERSION: VC12

install:
  - ps: $env:PATH = "C:/msys64/usr/bin;$env:PATH"

build_script:
  - cmd: sh -c ./appveyor.sh

clone_depth: 10

# select branches to avoid testing feature branches twice (as branch and as pull request)
branches:
  only:
    - master
    - /\/ci$/

skip_commits:
  files:
    - '.circleci/*'
    - '.github/**/*'
    - 'Dockerfile'
    - 'projects/OS400/*'
    - 'projects/vms/*'

#artifacts:
#  - path: '**/curl.exe'
#    name: curl
#  - path: '**/*.dll'
#    name: libcurl dll
#  - path: '**/*.lib'
#    name: libcurl lib
