From bf2685757acbac57c46239e374b3099b82b72894 Mon Sep 17 00:00:00 2001 From: leileizhang Date: Thu, 27 Feb 2025 16:39:25 +0800 Subject: [PATCH] [CI] Use Download Task for X64 and Bypass ARM Testing for Forked Repositories (#37617) * use x64 * add conditation for arm tests * check repo * use System.PullRequest.IsFork * remove print * remove condition --- .pipelines/v2/templates/job-test-project.yml | 15 ++++++++++++--- .pipelines/v2/templates/pipeline-ci-build.yml | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.pipelines/v2/templates/job-test-project.yml b/.pipelines/v2/templates/job-test-project.yml index c2e7bb4e7d..d5252ba23b 100644 --- a/.pipelines/v2/templates/job-test-project.yml +++ b/.pipelines/v2/templates/job-test-project.yml @@ -61,9 +61,18 @@ jobs: reg add "HKLM\Software\Policies\Microsoft\Edge\WebView2\ReleaseChannels" /v PowerToys.exe /t REG_SZ /d "3" displayName: "Enable WebView2 Canary Channel" - - template: steps-download-artifacts-with-azure-cli.yml - parameters: - artifactName: $(TestArtifactsName) + - ${{ if ne(parameters.platform, 'arm64') }}: + - download: current + displayName: Download artifacts + artifact: $(TestArtifactsName) + patterns: |- + ** + !**\*.pdb + !**\*.lib + - ${{ else }}: + - template: steps-download-artifacts-with-azure-cli.yml + parameters: + artifactName: $(TestArtifactsName) - template: steps-ensure-dotnet-version.yml parameters: diff --git a/.pipelines/v2/templates/pipeline-ci-build.yml b/.pipelines/v2/templates/pipeline-ci-build.yml index 8183b50c02..7e4a99308f 100644 --- a/.pipelines/v2/templates/pipeline-ci-build.yml +++ b/.pipelines/v2/templates/pipeline-ci-build.yml @@ -72,7 +72,7 @@ stages: winAppSDKVersionNumber: ${{ parameters.winAppSDKVersionNumber }} useExperimentalVersion: ${{ parameters.useExperimentalVersion }} - - ${{ if eq(parameters.runTests, true) }}: + - ${{ if and(eq(parameters.runTests, true), not(and(eq(platform, 'arm64'), eq(variables['System.PullRequest.IsFork'], true)))) }}: - stage: Test_${{ platform }} displayName: Test ${{ platform }} dependsOn: