This commit is contained in:
Michael Cummings (MSFT) 2023-12-06 07:47:17 -05:00 коммит произвёл GitHub
Родитель 9bef443d92 10691ca38d
Коммит f30043647f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
10 изменённых файлов: 74 добавлений и 226 удалений

Просмотреть файл

@ -35,22 +35,6 @@ parameters:
type: string
jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: false
- ${{ if eq(parameters.pool, 'automatic') }}:
- job: AgentPoolSelector # https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml
@ -72,7 +56,6 @@ jobs:
dependsOn:
- ${{ if eq(parameters.pool, 'automatic') }}:
- AgentPoolSelector
- configure
displayName: 'Detect API changes'
timeoutInMinutes: 1000
variables:
@ -82,10 +65,10 @@ jobs:
AgentPoolComputed: $(CIBuildPool)
${{ if eq(parameters.pool, 'pr') }}:
AgentPoolComputed: $(PRBuildPool)
PR_ID: $[ dependencies.configure.outputs['labels.pr_number'] ]
PR_ID: $[ stageDependencies.configure_build.configure.outputs['labels.pr_number'] ]
# set the branch variable name, this is required by jenkins and we have a lot of scripts that depend on it
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
XHARNESS_LABELS: $[ dependencies.configure.outputs['labels.xharness_labels'] ]
XHARNESS_LABELS: $[ stageDependencies.configure_build.configure.outputs['labels.xharness_labels'] ]
pool:
name: $(AgentPoolComputed)
demands:
@ -113,7 +96,6 @@ jobs:
displayName: 'Upload / Publish change detection results to VSDrops / GitHub'
timeoutInMinutes: 1000
dependsOn: # can start as soon as the api diff is done
- configure
- api_diff
condition: succeededOrFailed()
pool:

Просмотреть файл

@ -35,22 +35,6 @@ parameters:
type: string
jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: true
- ${{ if eq(parameters.pool, 'automatic') }}:
- job: AgentPoolSelector # https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml
@ -69,20 +53,18 @@ jobs:
# This job builds the macOS tests.
#
# - configure: Get the labels from gihub and populate the output.
# - AgentPoolSelector: If the build was not manually triggered to use a specific pool, this job is used to decide if the build is using a
# private pool or a public one.
- job: build_macos_tests_job
dependsOn:
- ${{ if eq(parameters.pool, 'automatic') }}:
- AgentPoolSelector
- configure
displayName: 'Build macOS tests'
timeoutInMinutes: 120
variables:
DOTNET_PLATFORMS: $[ dependencies.configure.outputs['configure_platforms.DOTNET_PLATFORMS'] ]
ENABLE_DOTNET: $[ dependencies.configure.outputs['configure_platforms.ENABLE_DOTNET'] ]
INCLUDE_XAMARIN_LEGACY: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_XAMARIN_LEGACY'] ]
DOTNET_PLATFORMS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.DOTNET_PLATFORMS'] ]
ENABLE_DOTNET: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'] ]
INCLUDE_XAMARIN_LEGACY: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_XAMARIN_LEGACY'] ]
${{ if eq(parameters.pool, 'automatic') }}:
AgentPoolComputed: $[ dependencies.AgentPoolSelector.outputs['setAgentPool.AgentPoolComputed'] ]
${{ if eq(parameters.pool, 'ci') }}:
@ -91,11 +73,11 @@ jobs:
AgentPoolComputed: $(PRBuildPool)
# add all the variables that have been parsed by the configuration step. Could we have a less verbose way??
# old and ugly env var use by jenkins, we do have parts of the code that use it, contains the PR number
PR_ID: $[ dependencies.configure.outputs['labels.pr_number'] ]
PR_ID: $[ stageDependencies.configure_build.configure.outputs['labels.pr_number'] ]
# set the branch variable name, this is required by jenkins and we have a lot of scripts that depend on it
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
RUN_MAC_TESTS: $[ dependencies.configure.outputs['decisions.RUN_MAC_TESTS'] ]
condition: ne(dependencies.configure.outputs['decisions.RUN_MAC_TESTS'],'')
RUN_MAC_TESTS: $[ stageDependencies.configure_build.configure.outputs['decisions.RUN_MAC_TESTS'] ]
condition: ne(stageDependencies.configure_build.configure.outputs['decisions.RUN_MAC_TESTS'],'')
pool:
name: $(AgentPoolComputed)
demands:

Просмотреть файл

@ -47,23 +47,6 @@ parameters:
type: string
jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: true
- ${{ if eq(parameters.pool, 'automatic') }}:
- job: AgentPoolSelector # https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml
pool: # Consider using an agentless (server) job here, but would need to host selection logic as an Azure function: https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#server
@ -81,28 +64,26 @@ jobs:
# This job performs the build of the nuget pkgs and the framework pkgs. There are two interesting dependencies in this job:
#
# - configure: Get the labels from gihub and populate the output.
# - AgentPoolSelector: If the build was not manually triggered to use a specific pool, this job is used to decide if the build is using a
# private pool or a public one.
- job: build
dependsOn:
- ${{ if eq(parameters.pool, 'automatic') }}:
- AgentPoolSelector
- configure
displayName: 'Build packages'
timeoutInMinutes: 1000
variables:
DOTNET_PLATFORMS: $[ dependencies.configure.outputs['configure_platforms.DOTNET_PLATFORMS'] ]
ENABLE_DOTNET: $[ dependencies.configure.outputs['configure_platforms.ENABLE_DOTNET'] ]
INCLUDE_DOTNET_IOS: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_DOTNET_IOS'] ]
INCLUDE_DOTNET_MACCATALYST: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_DOTNET_MACCATALYST'] ]
INCLUDE_DOTNET_MACOS: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_DOTNET_MACOS'] ]
INCLUDE_DOTNET_TVOS: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_DOTNET_TVOS'] ]
INCLUDE_LEGACY_IOS: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_LEGACY_IOS'] ]
INCLUDE_LEGACY_MAC: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_LEGACY_MAC'] ]
INCLUDE_LEGACY_TVOS: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_LEGACY_TVOS'] ]
INCLUDE_LEGACY_WATCH: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_LEGACY_WATCH'] ]
INCLUDE_XAMARIN_LEGACY: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_XAMARIN_LEGACY'] ]
DOTNET_PLATFORMS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.DOTNET_PLATFORMS'] ]
ENABLE_DOTNET: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'] ]
INCLUDE_DOTNET_IOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_IOS'] ]
INCLUDE_DOTNET_MACCATALYST: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_MACCATALYST'] ]
INCLUDE_DOTNET_MACOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_MACOS'] ]
INCLUDE_DOTNET_TVOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_TVOS'] ]
INCLUDE_LEGACY_IOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_LEGACY_IOS'] ]
INCLUDE_LEGACY_MAC: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_LEGACY_MAC'] ]
INCLUDE_LEGACY_TVOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_LEGACY_TVOS'] ]
INCLUDE_LEGACY_WATCH: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_LEGACY_WATCH'] ]
INCLUDE_XAMARIN_LEGACY: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_XAMARIN_LEGACY'] ]
${{ if eq(parameters.pool, 'automatic') }}:
AgentPoolComputed: $[ dependencies.AgentPoolSelector.outputs['setAgentPool.AgentPoolComputed'] ]
${{ if eq(parameters.pool, 'ci') }}:
@ -116,18 +97,18 @@ jobs:
# skip-nugets
# skip-signing
# run-sample-tests
BuildPackage: $[ dependencies.configure.outputs['labels.build_package'] ]
SkipPackages: $[ dependencies.configure.outputs['labels.skip_packages'] ]
SkipNugets: $[ dependencies.configure.outputs['labels.skip_nugets'] ]
SkipSigning: $[ dependencies.configure.outputs['labels.skip_signing'] ]
RunSampleTests: $[ dependencies.configure.outputs['labels.run_sample_tests'] ]
SkipApiComparison: $[ dependencies.configure.outputs['labels.skip_api_comparison'] ]
BuildPackage: $[ stageDependencies.configure_build.configure.outputs['labels.build_package'] ]
SkipPackages: $[ stageDependencies.configure_build.configure.outputs['labels.skip_packages'] ]
SkipNugets: $[ stageDependencies.configure_build.configure.outputs['labels.skip_nugets'] ]
SkipSigning: $[ stageDependencies.configure_build.configure.outputs['labels.skip_signing'] ]
RunSampleTests: $[ stageDependencies.configure_build.configure.outputs['labels.run_sample_tests'] ]
SkipApiComparison: $[ stageDependencies.configure_build.configure.outputs['labels.skip_api_comparison'] ]
# old and ugly env var use by jenkins, we do have parts of the code that use it, contains the PR number
PR_ID: $[ dependencies.configure.outputs['labels.pr_number'] ]
PR_ID: $[ stageDependencies.configure_build.configure.outputs['labels.pr_number'] ]
# set the branch variable name, this is required by jenkins and we have a lot of scripts that depend on it
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
XHARNESS_LABELS: $[ dependencies.configure.outputs['labels.xharness_labels'] ]
RUN_MAC_TESTS: $[ dependencies.configure.outputs['decisions.RUN_MAC_TESTS'] ]
XHARNESS_LABELS: $[ stageDependencies.configure_build.configure.outputs['labels.xharness_labels'] ]
RUN_MAC_TESTS: $[ stageDependencies.configure_build.configure.outputs['decisions.RUN_MAC_TESTS'] ]
pool:
name: $(AgentPoolComputed)
demands:

Просмотреть файл

@ -40,31 +40,11 @@ stages:
displayName: ${{ parameters.displayName }}
dependsOn:
- build_macos_tests
condition: and(succeeded(), eq(dependencies.build_macos_tests.outputs['configure.decisions.RUN_MAC_TESTS'], 'true'))
variables:
GITHUB_FAILURE_COMMENT_FILE: $(System.DefaultWorkingDirectory)/github-comment-file.md
jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: false
- job: run_tests
dependsOn:
- configure
displayName: 'macOS tests'
timeoutInMinutes: 1000
workspace:
@ -78,7 +58,7 @@ stages:
vmImage: ${{ parameters.macPool }}
variables:
PR_ID: $[ dependencies.configure.outputs['labels.pr_number'] ]
PR_ID: $[ stageDependencies.configure_build.configure.outputs['labels.pr_number'] ]
GIT_HASH: $[ stageDependencies.build_macos_tests.build.outputs['fix_commit.GIT_HASH'] ]
steps:

Просмотреть файл

@ -175,13 +175,33 @@ stages:
steps:
- template: ./common/clean.yml
- stage: build_packages
displayName: '${{ parameters.stageDisplayNamePrefix }}Build'
- stage: configure_build
displayName: '${{ parameters.stageDisplayNamePrefix }}Configure'
dependsOn: ${{ parameters.dependsOn }}
${{ if and(ne(parameters.dependsOn, ''), ne(parameters.dependsOnResult, '')) }}:
condition: eq(dependencies.${{ parameters.dependsOn }}.result, '${{ parameters.dependsOnResult }}')
jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: true
- stage: build_packages
displayName: '${{ parameters.stageDisplayNamePrefix }}Build'
dependsOn: [ configure_build ]
jobs:
- template: ./build/build-stage.yml
parameters:
xcodeChannel: ${{ parameters.xcodeChannel }}
@ -200,9 +220,7 @@ stages:
- stage: build_macos_tests
displayName: '${{ parameters.stageDisplayNamePrefix }}Build macOS tests'
dependsOn: ${{ parameters.dependsOn }}
${{ if and(ne(parameters.dependsOn, ''), ne(parameters.dependsOnResult, '')) }}:
condition: eq(dependencies.${{ parameters.dependsOn }}.result, '${{ parameters.dependsOnResult }}')
dependsOn: [ configure_build ]
jobs:
- template: ./build/build-mac-tests-stage.yml
parameters:
@ -222,6 +240,7 @@ stages:
condition: and(eq(dependencies.build_packages.result, 'Succeeded'), eq('${{ parameters.enableLegacySigning }}', true))
dependsOn:
- build_packages
- configure_build
jobs:
- template: ./sign-and-notarized/prepare-pkg-stage.yml
parameters:
@ -251,7 +270,7 @@ stages:
}}
: - template: ./release/vs-insertion-prep.yml
parameters:
dependsOn: build_packages
dependsOn: [ build_packages, configure_build ]
stageDisplayNamePrefix: ${{ parameters.stageDisplayNamePrefix }}
isPR: ${{ parameters.isPR }}
repositoryAlias: ${{ parameters.repositoryAlias }}
@ -263,6 +282,7 @@ stages:
condition: and(eq(dependencies.prepare_packages_legacy.result, 'Succeeded'), eq('${{ parameters.enableLegacySigning }}', true))
dependsOn:
- prepare_packages_legacy
- configure_build
jobs:
- template: ./sign-and-notarized/funnel.yml
parameters:
@ -278,9 +298,7 @@ stages:
- ${{ if eq(parameters.enableAPIDiff, true) }}:
- stage: generate_api_diff
displayName: '${{ parameters.stageDisplayNamePrefix }}API diff'
dependsOn: ${{ parameters.dependsOn }}
${{ if and(ne(parameters.dependsOn, ''), ne(parameters.dependsOnResult, '')) }}:
condition: eq(dependencies.${{ parameters.dependsOn }}.result, '${{ parameters.dependsOnResult }}')
dependsOn: [ configure_build ]
jobs:
- template: ./build/api-diff-stage.yml
parameters:

Просмотреть файл

@ -42,23 +42,6 @@ stages:
condition: eq(${{ parameters.isPR }}, false)
jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: false
# Check - "xamarin-macios (Prepare Release Sign NuGets)"
- template: sign-artifacts/jobs/v2.yml@yaml-templates
parameters:
@ -66,7 +49,7 @@ stages:
artifactName: '${{ parameters.uploadPrefix }}not-signed-package'
signType: Real
usePipelineArtifactTasks: true
condition: "ne(dependencies.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')"
condition: "ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')"
dependsOn: configure
# Check - "xamarin-macios (Prepare Release Convert NuGet to MSI)"
@ -82,7 +65,7 @@ stages:
binlogsArtifactName: ${{ parameters.uploadPrefix }}nuget-msi-convert-binlogs
signType: Real
useDateTimeVersion: true
condition: "ne(dependencies.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')"
condition: "ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')"
postConvertSteps:
- task: DownloadPipelineArtifact@2
inputs:
@ -105,7 +88,7 @@ stages:
- job: push_signed_nugets
displayName: Push NuGets
dependsOn: nuget_convert
condition: "ne(dependencies.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')"
condition: "ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')"
variables:
skipNugetSecurityAnalysis: true
pool:

Просмотреть файл

@ -25,25 +25,7 @@ parameters:
default: '$(MaciosUploadPrefix)'
jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
- job: funnel_job
dependsOn:
- configure
displayName: 'Collect signed artifacts'
condition: and(not(failed()), not(canceled())) # default is succeded(), but that fails if there are any skipped jobs, so change the condition to !failed && !cancelled
timeoutInMinutes: 1000
@ -53,7 +35,7 @@ jobs:
clean: all
variables:
${{ each pkg in parameters.packages }}:
${{ pkg.conditionVariable }}: $[ dependencies.configure.outputs['configure_platforms.${{ pkg.conditionVariable }}'] ]
${{ pkg.conditionVariable }}: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.${{ pkg.conditionVariable }}'] ]
steps:
@ -168,7 +150,7 @@ jobs:
variables:
Parameters.outputStorageUri: ''
SKIP_NUGETS: $[ dependencies.configure.outputs['labels.skip_nugets'] ]
SKIP_NUGETS: $[ stageDependencies.configure_build.configuree.outputs['labels.skip_nugets'] ]
pool:
name: azurepipelines-EO
@ -190,11 +172,10 @@ jobs:
displayName: 'Publish GitHub Comment - Artifacts'
timeoutInMinutes: 1000
dependsOn:
- configure
- upload_azure_blob
condition: succeededOrFailed()
variables:
PR_ID: $[ dependencies.configure.outputs['labels.pr_number'] ]
PR_ID: $[ stageDependencies.configure_build.configure.outputs['labels.pr_number'] ]
TESTS_BOT: $[ stageDependencies.build_packages.build.outputs['build.TESTS_BOT'] ] # we build in a diff bot than the ones used for the comments
GIT_HASH: $[ stageDependencies.build_packages.build.outputs['fix_commit.GIT_HASH'] ]
pool:

Просмотреть файл

@ -27,28 +27,11 @@ parameters:
default: []
jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
- ${{ each pkg in parameters.packages }}:
- job: ${{ pkg.job }}
dependsOn:
- configure
displayName: 'Sign & Notarize ${{ pkg.name }}'
condition: ne(dependencies.configure.outputs['configure_platforms.${{ pkg.conditionVariable }}'],'')
condition: ne(stageDependencies.configure_build.configure.outputs['configure_platforms.${{ pkg.conditionVariable }}'],'')
timeoutInMinutes: 1000
pool:
vmImage: internal-macos-11

Просмотреть файл

@ -91,42 +91,22 @@ stages:
displayName: ${{ parameters.displayName }}
dependsOn:
- build_packages
- configure_build
# we need to have the pkgs built and the device sets to be ran, that is decided via the labels or type of build during the build_packages stage
condition: and(succeeded(), ${{ parameters.condition }})
jobs:
- ${{ if eq(parameters.parseLabels, true) }}:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: false
- job: "tests"
${{ if eq(parameters.parseLabels, true) }}:
condition: ne(dependencies.configure.outputs['labels.skip_all_tests'], 'True')
dependsOn:
- ${{ if eq(parameters.parseLabels, true) }}:
- configure
condition: ne(stageDependencies.configure_build.configure.outputs['labels.skip_all_tests'], 'True')
displayName: 'Running tests:'
timeoutInMinutes: 1000
variables:
# old and ugly env var use by jenkins, we do have parts of the code that use it, contains the PR number
PR_ID: $[ dependencies.configure.outputs['labels.pr_number'] ]
PR_ID: $[ stageDependencies.configure_build.configure.outputs['labels.pr_number'] ]
# set the branch variable name, this is required by jenkins and we have a lot of scripts that depend on it
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
XHARNESS_LABELS: $[ dependencies.configure.outputs['labels.xharness_labels'] ]
XHARNESS_LABELS: $[ stageDependencies.configure_build.configure.outputs['labels.xharness_labels'] ]
${{ if eq(parameters.testPool, '') }}:
AgentPoolComputed: $(PRBuildPool)
${{ else }}:
@ -169,15 +149,13 @@ stages:
- job: publish_test_results
${{ if eq(parameters.parseLabels, true) }}:
condition: and(ne(dependencies.configure.outputs['labels.skip_all_tests'], 'True'), succeededOrFailed())
condition: and(ne(stageDependencies.configure_build.configure.outputs['labels.skip_all_tests'], 'True'), succeededOrFailed())
${{ else }}:
condition: succeededOrFailed()
displayName: 'GitHub comment - Publish results'
timeoutInMinutes: 1000
dependsOn: # has to wait for the tests to be done AND the data to be uploaded
- tests
- ${{ if eq(parameters.parseLabels, true) }}:
- configure
variables:
GIT_HASH: $[ stageDependencies.build_packages.build.outputs['fix_commit.GIT_HASH'] ]
${{ each label in parameters.simTestsConfigurations }}:
@ -202,13 +180,11 @@ stages:
- job: publish_skipped_tests
${{ if eq(parameters.parseLabels, true) }}:
condition: eq(dependencies.configure.outputs['labels.skip_all_tests'], 'True')
condition: eq(stageDependencies.configure_build.configure.outputs['labels.skip_all_tests'], 'True')
${{ else }}:
condition: false
displayName: 'GitHub comment - Skipped tests'
timeoutInMinutes: 1000
dependsOn: # has to wait for the tests to be done AND the data to be uploaded
- configure
variables:
GIT_HASH: $[ stageDependencies.build_packages.build.outputs['fix_commit.GIT_HASH'] ]

Просмотреть файл

@ -37,32 +37,15 @@ stages:
displayName: ${{ parameters.displayName }}
dependsOn:
- build_packages
condition: and(succeeded(), eq(dependencies.build_packages.outputs['configure.decisions.RUN_WINDOWS_TESTS'], 'true'))
- configure_build
condition: and(succeeded(), eq(dependencies.configure_build.outputs['configure.decisions.RUN_WINDOWS_TESTS'], 'true'))
jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: false
- job: mac_reservation
dependsOn:
- configure
displayName: "Reserve bot for tests"
timeoutInMinutes: 1000
condition: ne(dependencies.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')
condition: ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')
workspace:
clean: all
pool:
@ -81,10 +64,9 @@ stages:
- job: run_tests
dependsOn:
- mac_reservation
- configure
displayName: 'Dotnet tests'
timeoutInMinutes: 1000
condition: ne(dependencies.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')
condition: ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')
workspace:
clean: all