# Branches that trigger a build on commit
trigger:
- master
- 2.9.x

# Branch(es) that trigger(s) build(s) on PR
pr:
- master
- 2.9.x

jobs:
- job: Windows
  strategy:
    maxParallel: 4
    matrix:
      Debug:
        _configuration: Debug
        _codeCoverage: True
      Release:
        _configuration: Release
        _codeCoverage: False
  pool:
    name: NetCorePublic-Pool
    queue: buildpool.windows.10.amd64.vs2017.open
  timeoutInMinutes: 20

  steps:
    - checkout: self
      clean: true
    - script: eng\common\cibuild.cmd -configuration $(_configuration) -prepareMachine /p:Coverage=$(_codeCoverage)
      displayName: Build and Test

    - task: PublishTestResults@2
      inputs:
        testRunner: XUnit
        testResultsFiles: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)\*.xml'
        mergeTestResults: true
        testRunTitle: 'Windows $(_configuration)'
      condition: always()
    - script: $(Build.SourcesDirectory)/.dotnet/dotnet msbuild -restore eng/CodeCoverage.proj
      displayName: Upload coverage to codecov.io
      condition: and(succeeded(), eq(variables['_codeCoverage'], True))
    - task: PublishBuildArtifacts@1
      displayName: Publish Logs
      inputs:
        PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_configuration)'
        ArtifactName: 'Windows $(_configuration)'
      continueOnError: true
      condition: not(succeeded())

# Branches that trigger a build on commit
trigger:
- master
- 2.9.x

# Branch(es) that trigger(s) build(s) on PR
pr:
- master
- 2.9.x

jobs:
- job: Windows
  strategy:
    maxParallel: 4
    matrix:
      Debug:
        _configuration: Debug
        _codeCoverage: True
      Release:
        _configuration: Release
        _codeCoverage: False
  pool:
    name: NetCorePublic-Pool
    queue: buildpool.windows.10.amd64.vs2017.open
  timeoutInMinutes: 25

  steps:
    - checkout: self
      clean: true
    - script: eng\common\cibuild.cmd -configuration $(_configuration) -prepareMachine /p:Coverage=$(_codeCoverage)
      displayName: Build and Test

    - task: PublishTestResults@2
      inputs:
        testRunner: XUnit
        testResultsFiles: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)\*.xml'
        mergeTestResults: true
        testRunTitle: 'Windows $(_configuration)'
      condition: always()
    - script: $(Build.SourcesDirectory)/.dotnet/dotnet msbuild -restore eng/CodeCoverage.proj
      displayName: Upload coverage to codecov.io
      condition: and(succeeded(), eq(variables['_codeCoverage'], True))
    - task: PublishBuildArtifacts@1
      displayName: Publish Logs
      inputs:
        PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\$(_configuration)'
        ArtifactName: 'Windows $(_configuration)'
      continueOnError: true
      condition: not(succeeded())

Increase the build timeout to 25 minutes
Increase the build timeout to 25 minutes
