pr: none
trigger: none

jobs:
  - template: CI/job-doxygen.yml

  - job: Linux
    pool:
      vmImage: "ubuntu-latest"

    strategy:
      matrix:
        ubuntu1604:
          image: symless/synergy-core:ubuntu16.04
          packager: deb
          name: ubuntu16
          makeJobsLimit: 1
        ubuntu1804:
          image: symless/synergy-core:ubuntu18.04
          packager: deb
          name: ubuntu18
        ubuntu2004:
          image: symless/synergy-core:ubuntu20.04
          packager: deb
          name: ubuntu20
        ubuntu2104:
          image: symless/synergy-core:ubuntu21.04
          packager: deb
          name: ubuntu21
        ubuntu2204:
          image: symless/synergy-core:ubuntu22.04
          packager: deb
          name: ubuntu22
        debian9:
          image: symless/synergy-core:debian9
          packager: deb
          name: debian9
        debian10:
          image: symless/synergy-core:debian10
          packager: deb
          name: debian10
        debian11:
          image: symless/synergy-core:debian11
          packager: deb
          name: debian11
        fedora33:
          image: symless/synergy-core:fedora33
          packager: rpm
          name: fedora33
        fedora34:
          image: symless/synergy-core:fedora34
          packager: rpm
          name: fedora34
        fedora35:
          image: symless/synergy-core:fedora35
          packager: rpm
          name: fedora35
        fedora36:
          image: symless/synergy-core:fedora36
          packager: rpm
          name: fedora36
        fedora37:
          image: symless/synergy-core:fedora37
          packager: rpm
          name: fedora37
        fedora38:
          image: symless/synergy-core:fedora38
          packager: rpm
          name: fedora38
        centos7.6:
          image: symless/synergy-core:centos7.6
          packager: rpm
          name: centos76
        centos8:
          image: symless/synergy-core:centos8
          packager: rpm
          name: centos8

    container: $[ variables['image'] ]

    steps:
      - template: CI/checkout.yml
      - template: CI/Linux/linux-build.yml

  - job: MacOS
    strategy:
      matrix:
        catalina-std:
          image: macOS-latest
          platform: x86-64
          version: 10.14
          buildType: "standard"
          prefix: "synergy"
        catalina-ent:
          image: macOS-latest
          platform: x86-64
          version: 10.14
          buildType: "enterprise"
          prefix: "synergy-enterprise"
        catalina-business:
          image: macOS-latest
          platform: x86-64
          version: 10.14
          buildType: "business"
          prefix: "synergy-business"
    pool:
      vmImage: $[ variables['image'] ]

    variables:
      QT_VERSION: "5.15.2"
      QT_PATH: "/usr/local/opt/qt"
      Qt5_DIR: "$(QT_PATH)/$(QT_VERSION)/clang_64"

    steps:
      - template: CI/checkout.yml
      - template: CI/MacOS/mac-build.yml

  - job: Windows
    strategy:
      matrix:
        vs2019:
          image: windows-2019
          buildType: "standard"
          prefix: "synergy"
        vs2019ent:
          image: windows-2019
          buildType: "enterprise"
          prefix: "synergy-enterprise"
        vs2019business:
          image: windows-2019
          buildType: "business"
          prefix: "synergy-business"

    pool:
      vmImage: $[ variables['image'] ]

    variables:
      QT_VERSION: "5.12.6"
      QLI_OUT_DIR: '.\deps\Qt'
      QLI_BASE_URL: "http://qt.mirror.constant.com/"
      QT_BIN_PATH: '$(Build.Repository.LocalPath)\$(QLI_OUT_DIR)\$(QT_VERSION)\msvc2017_64'
      QT_BIN_PATH_32: '$(Build.Repository.LocalPath)\$(QLI_OUT_DIR)\$(QT_VERSION)\msvc2017'
      BONJOUR_SDK_DIR: 'deps\BonjourSDK'
      ENV_BAT: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\vsdevcmd'

    steps:
      - template: CI/checkout.yml
      - template: CI/Windows/windows-build.yml
