From 90a489352b56dfd006eacac76e3d9dda360cb499 Mon Sep 17 00:00:00 2001 From: XiaofengWang <709586527@qq.com> Date: Fri, 9 May 2025 16:52:39 +0800 Subject: [PATCH] Support pipeline running on win11 x64 (#39328) * Support pipeline running on win11-x64 * Update naming * Update dependency * Update jobs * update format * update format * update naming * Update jobs to stages * Update Artifacts Name * Update TestArtifactsName * Update variable format --------- Co-authored-by: Xiaofeng Wang (from Dev Box) --- .pipelines/v2/templates/job-test-project.yml | 11 ++++- .../pipeline-ui-tests-automation.yml | 49 ++++++++++++++----- 2 files changed, 47 insertions(+), 13 deletions(-) diff --git a/.pipelines/v2/templates/job-test-project.yml b/.pipelines/v2/templates/job-test-project.yml index 81efc062dc..663c38488d 100644 --- a/.pipelines/v2/templates/job-test-project.yml +++ b/.pipelines/v2/templates/job-test-project.yml @@ -20,19 +20,26 @@ jobs: displayName: Test ${{ parameters.platform }} ${{ parameters.configuration }} timeoutInMinutes: 300 variables: - BuildPlatform: ${{ parameters.platform }} + ${{ if or(eq(parameters.platform, 'x64Win10'), eq(parameters.platform, 'x64Win11')) }}: + BuildPlatform: x64 + ${{ else }}: + BuildPlatform: ${{ parameters.platform }} BuildConfiguration: ${{ parameters.configuration }} SrcPath: $(Build.Repository.LocalPath) - TestArtifactsName: build-${{ parameters.platform }}-${{ parameters.configuration }}${{ parameters.inputArtifactStem }} + TestArtifactsName: build-${{ variables.BuildPlatform }}-${{ parameters.configuration }}${{ parameters.inputArtifactStem }} pool: ${{ if eq(variables['System.CollectionId'], 'cb55739e-4afe-46a3-970f-1b49d8ee7564') }}: ${{ if ne(parameters.platform, 'ARM64') }}: name: SHINE-INT-Testing-x64 + ${{ if and(eq(parameters.isUIAutomationPipeline, true), eq(parameters.platform, 'x64Win11')) }}: + demands: ImageOverride -equals SHINE-W11-Testing ${{ else }}: name: SHINE-INT-Testing-arm64 ${{ else }}: ${{ if ne(parameters.platform, 'ARM64') }}: name: SHINE-OSS-Testing-x64 + ${{ if and(eq(parameters.isUIAutomationPipeline, true), eq(parameters.platform, 'x64Win11')) }}: + demands: ImageOverride -equals SHINE-W11-Testing ${{ else }}: name: SHINE-OSS-Testing-arm64 steps: diff --git a/.pipelines/v2/templates/pipeline-ui-tests-automation.yml b/.pipelines/v2/templates/pipeline-ui-tests-automation.yml index 9c3be4dda6..0949aba65b 100644 --- a/.pipelines/v2/templates/pipeline-ui-tests-automation.yml +++ b/.pipelines/v2/templates/pipeline-ui-tests-automation.yml @@ -47,14 +47,41 @@ stages: buildTests: true useVSPreview: ${{ parameters.useVSPreview }} - - stage: Test_${{ platform }} - displayName: Test ${{ platform }} - dependsOn: - - Build_${{platform}} - jobs: - - template: job-test-project.yml - parameters: - platform: ${{ platform }} - configuration: Release - useLatestWebView2: ${{ parameters.useLatestWebView2 }} - isUIAutomationPipeline: true + - ${{ if eq(platform, 'x64') }}: + - stage: Test_x64Win10 + displayName: Test x64Win10 + dependsOn: + - Build_${{platform}} + jobs: + - template: job-test-project.yml + parameters: + platform: x64Win10 + configuration: Release + useLatestWebView2: ${{ parameters.useLatestWebView2 }} + isUIAutomationPipeline: true + + - ${{ if eq(platform, 'x64') }}: + - stage: Test_x64Win11 + displayName: Test x64Win11 + dependsOn: + - Build_${{platform}} + jobs: + - template: job-test-project.yml + parameters: + platform: x64Win11 + configuration: Release + useLatestWebView2: ${{ parameters.useLatestWebView2 }} + isUIAutomationPipeline: true + + - ${{ if ne(platform, 'x64') }}: + - stage: Test_${{ platform }} + displayName: Test ${{ platform }} + dependsOn: + - Build_${{platform}} + jobs: + - template: job-test-project.yml + parameters: + platform: ${{ platform }} + configuration: Release + useLatestWebView2: ${{ parameters.useLatestWebView2 }} + isUIAutomationPipeline: true