|
| 1 | +################################################################################# |
| 2 | +# Licensed to the .NET Foundation under one or more agreements. # |
| 3 | +# The .NET Foundation licenses this file to you under the MIT license. # |
| 4 | +# See the LICENSE file in the project root for more information. # |
| 5 | +################################################################################# |
| 6 | + |
| 7 | +# This pipeline is used to trigger PR validation runs for dev/topic/feature |
| 8 | +# branches in GitHub using the Package reference type. |
| 9 | +# |
| 10 | +# It maps to the "PR-SqlClient-Package" pipeline in Azure DevOps. |
| 11 | + |
| 12 | +# Set the pipeline run name to the day-of-year and the daily run counter. |
| 13 | +name: $(DayOfYear)$(Rev:rr) |
| 14 | + |
| 15 | +# Trigger PR validation runs for all pushes to PRs that target the specified |
| 16 | +# branches. |
| 17 | +# |
| 18 | +# https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml#pr-triggers |
| 19 | +# |
| 20 | +pr: |
| 21 | + branches: |
| 22 | + include: |
| 23 | + # GitHub repo branch targets that will trigger PR validation builds. |
| 24 | + # TODO: Temporarily restricting to my ci-debug branches only. |
| 25 | + - dev/paul/ci-debug-* |
| 26 | + # - dev/* |
| 27 | + # - feat/* |
| 28 | + # - main |
| 29 | + |
| 30 | + paths: |
| 31 | + include: |
| 32 | + - .azuredevops |
| 33 | + - .config |
| 34 | + - src |
| 35 | + - eng |
| 36 | + - tools |
| 37 | + - azurepipelines-coverage.yml |
| 38 | + - build.proj |
| 39 | + - NuGet.config |
| 40 | + |
| 41 | +# Pipeline parameters, visible in the Azure DevOps UI. |
| 42 | +parameters: |
| 43 | + |
| 44 | +# The build configuration to use; defaults to Debug. |
| 45 | +- name: buildConfiguration |
| 46 | + displayName: Build Configuration |
| 47 | + type: string |
| 48 | + default: Debug |
| 49 | + values: |
| 50 | + - Debug |
| 51 | + - Release |
| 52 | + |
| 53 | +- name: buildPlatforms |
| 54 | + displayName: Build Platforms on Windows |
| 55 | + type: object |
| 56 | + default: [AnyCPU] |
| 57 | + |
| 58 | +- name: codeCovTargetFrameworks |
| 59 | + displayName: Code Coverage Target Frameworks |
| 60 | + type: object |
| 61 | + default: [net462, net8.0] |
| 62 | + |
| 63 | +- name: debug |
| 64 | + displayName: Enable debug output |
| 65 | + type: boolean |
| 66 | + default: false |
| 67 | + |
| 68 | +- name: enableStressTests |
| 69 | + displayName: Enable Stress Tests |
| 70 | + type: boolean |
| 71 | + default: false |
| 72 | + |
| 73 | +- name: targetFrameworks |
| 74 | + displayName: Target Frameworks on Windows |
| 75 | + type: object |
| 76 | + default: [net462, net8.0, net9.0] |
| 77 | + |
| 78 | +- name: targetFrameworksLinux |
| 79 | + displayName: Target Frameworks on Non-Windows |
| 80 | + type: object |
| 81 | + default: [net8.0, net9.0] |
| 82 | + |
| 83 | +- name: testSets |
| 84 | + displayName: Test Sets |
| 85 | + type: object |
| 86 | + default: [1, 2, 3] |
| 87 | + |
| 88 | +# The timeout, in minutes, for each test job. |
| 89 | +- name: testJobTimeout |
| 90 | + displayName: Test job timeout (in minutes) |
| 91 | + type: string |
| 92 | + default: Default |
| 93 | + |
| 94 | +- name: useManagedSNI |
| 95 | + displayName: | |
| 96 | + Use Managed/Native SNI on Windows, |
| 97 | + values [false, true], [false] or [true] are allowed |
| 98 | + type: object |
| 99 | + default: [false, true] |
| 100 | + |
| 101 | +extends: |
| 102 | + template: dotnet-sqlclient-ci-core.yml@self |
| 103 | + parameters: |
| 104 | + buildConfiguration: ${{ parameters.buildConfiguration }} |
| 105 | + buildPlatforms: ${{ parameters.buildPlatforms }} |
| 106 | + buildType: Package |
| 107 | + codeCovTargetFrameworks: ${{ parameters.codeCovTargetFrameworks }} |
| 108 | + debug: ${{ parameters.debug }} |
| 109 | + enableStressTests: ${{ parameters.enableStressTests }} |
| 110 | + targetFrameworks: ${{ parameters.targetFrameworks }} |
| 111 | + targetFrameworksLinux: ${{ parameters.targetFrameworksLinux }} |
| 112 | + testSets: ${{ parameters.testSets }} |
| 113 | + # Populate the actual test job timeout numeric values if Default was |
| 114 | + # specified. We choose different values depending on the build |
| 115 | + # configuration. |
| 116 | + ${{ if eq(parameters.testJobTimeout, 'Default') }}: |
| 117 | + # If the build configuration is Debug, double the test job timeout value. |
| 118 | + # Some of our tests currently take much longer to run in Debug mode. |
| 119 | + ${{ if eq(parameters.buildConfiguration, 'Debug') }}: |
| 120 | + testJobTimeout: 180 |
| 121 | + ${{ else }}: |
| 122 | + testJobTimeout: 90 |
| 123 | + ${{ else }}: |
| 124 | + testJobTimeout: ${{ parameters.testJobTimeout }} |
| 125 | + useManagedSNI: ${{ parameters.useManagedSNI }} |
0 commit comments