diff --git a/azure-pipelines-pr.yml b/azure-pipelines-pr.yml index 0bdf32a634c..a818962d505 100644 --- a/azure-pipelines-pr.yml +++ b/azure-pipelines-pr.yml @@ -1,39 +1,3 @@ -# This is a simple wrapper for eng/pipeline.yml to get around the limitation of -# user-defined variables not being available in yaml template expressions. - -# Parameters ARE available in template expressions, and parameters can have default values, -# so they can be used to control yaml flow. -# - -variables: - # clean the local repo on the build agents - - name: Build.Repository.Clean - value: true - - name: _DotNetArtifactsCategory - value: WINDOWSDESKTOP - - name: _DotNetValidationArtifactsCategory - value: WINDOWSDESKTOP - - ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}: - - name: PostBuildSign - value: false - - ${{ else }}: - - name: PostBuildSign - value: true - - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - group: DotNet-Wpf-SDLValidation-Params - - -# This is set in the pipeline directly -# When set to false, CI tests will not be enabled in builds. -# -# _ContinuousIntegrationTestsEnabled: false - -# Setting batch to true, triggers one build at a time. -# if there is a push while a build in progress, it will wait, -# until the running build finishes, and produce a build with all the changes -# -# only trigger ci builds for the master and release branches trigger: batch: true branches: @@ -59,34 +23,133 @@ pr: exclude: - Documentation/* -# Call the pipeline-pr.yml template, which does the real work +variables: +- name: repoName + value: dotnet/wpf + stages: - stage: build displayName: Build jobs: - - template: /eng/pipeline-pr.yml + - template: /eng/common/templates/jobs/jobs.yml@self parameters: - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - runAsPublic: false + enablePublishBuildArtifacts: true + enablePublishTestResults: false + enablePublishBuildAssets: false + enablePublishUsingPipelines: false + enableTelemetry: true + helixRepo: $(repoName) -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - template: eng\common\templates\post-build\post-build.yml - parameters: - publishingInfraVersion: 3 - enableSymbolValidation: false - enableSigningValidation: false - enableNugetValidation: false - enableSourceLinkValidation: false - # This is to enable SDL runs part of Post-Build Validation Stage - SDLValidationParameters: - enable: false - params: ' -SourceToolsList @("policheck","credscan") - -TsaInstanceURL $(_TsaInstanceURL) - -TsaProjectName $(_TsaProjectName) - -TsaNotificationEmail $(_TsaNotificationEmail) - -TsaCodebaseAdmin $(_TsaCodebaseAdmin) - -TsaBugAreaPath $(_TsaBugAreaPath) - -TsaIterationPath $(_TsaIterationPath) - -TsaRepositoryName "wpf" - -TsaCodebaseName "wpf" - -TsaPublish $True' + jobs: + - job: Windows_NT + timeoutInMinutes: 120 # how long to run the job before automatically cancelling; see https://github.com/dotnet/wpf/issues/952 + pool: + # For public jobs, use the hosted pool. For internal jobs use the internal pool. + # Will eventually change this to two BYOC pools. + # agent pool can't be read from a user-defined variable (Azure DevOps limitation) + ${{ if eq(variables['System.TeamProject'], 'public') }}: + name: NetCore-Public + demands: ImageOverride -equals windows.vs2022.amd64.Open + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: NetCore1ESPool-Internal + demands: ImageOverride -equals windows.vs2022.amd64 + variables: + - name: _Platform + value: x86 + - name: _PlatformArgs + value: /p:Platform=$(_Platform) + - name: _TestHelixAgentPool + value: 'Windows.10.Amd64.ClientRS5.Open' # Preferred:'Windows.10.Amd64.Open%3bWindows.7.Amd64.Open%3bWindows.10.Amd64.ClientRS5.Open'; See https://github.com/dotnet/wpf/issues/952 + - name: _HelixStagingDir + value: $(BUILD.STAGINGDIRECTORY)\helix\functests + - name: _HelixSource + value: $(repoName)/$(Build.SourceBranch) + - name: _HelixToken + value: '' + - name: _HelixCreator + value: $(repoName) + - name: _programfilesx86 + value: ${Env:ProgramFiles(x86)}/dotnet + - name: _programfiles + value: ${Env:ProgramFiles}/dotnet + - ${{ if ne(variables['System.TeamProject'], 'internal') }}: + - name: _InternalRuntimeDownloadArgs + value: '' + - ${{ if eq(variables['System.TeamProject'], 'internal') }}: + - group: AzureDevOps-Artifact-Feeds-Pats + - group: DotNet-HelixApi-Access + - name: _InternalRuntimeDownloadArgs + value: >- + /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal + /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) + - name: _HelixSource + value: official/$(repoName)/$(Build.SourceBranch) + - name: _HelixToken + value: '$(HelixApiAccessToken)' # from DotNet-HelixApi-Access group + - name: _HelixCreator + value: '' #if _HelixToken is set, Creator must be empty + - name: _TestHelixAgentPool + value: 'Windows.10.Amd64.ClientRS5' # Preferred: 'Windows.10.Amd64%3bWindows.7.Amd64%3bWindows.10.Amd64.ClientRS5' + + strategy: + matrix: + Build_Debug_x86: + _BuildConfig: Debug + Build_Release_x86: + _BuildConfig: Release + Build_Debug_x64: + _BuildConfig: Debug + _Coverage: true + # override some variables for debug + # _SignType has to be real for package publishing to succeed - do not override to test. + _Platform: x64 + Build_Release_x64: + _BuildConfig: Release + _Platform: x64 + Build_Debug_arm64: + _BuildConfig: Debug + # override some variables for debug + # _SignType has to be real for package publishing to succeed - do not override to test. + _Platform: arm64 + Build_Release_arm64: + _BuildConfig: Release + _Platform: arm64 + steps: + # Set VSO Variable(s) + - powershell: eng\pre-build.ps1 + displayName: Pre-Build - Set VSO Variables + + - template: /eng/common/templates/steps/enable-internal-sources.yml + - template: /eng/common/templates/steps/enable-internal-runtimes.yml + + # Use utility script to run script command dependent on agent OS. + - script: eng\scripts\cibuild.cmd + -configuration $(_BuildConfig) + -prepareMachine + $(_PlatformArgs) + $(_InternalRuntimeDownloadArgs) + /p:Coverage=$(_Coverage) + displayName: Windows Build / Publish + + - script: eng\scripts\ciunittest.cmd + -configuration $(_BuildConfig) + -prepareMachine + $(_PlatformArgs) + $(_InternalRuntimeDownloadArgs) + /bl:$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)\Test.binlog + /p:Coverage=$(_Coverage) + displayName: Run xUnit Tests + condition: eq(variables['_Platform'], 'x64') + + - task: PublishTestResults@2 + displayName: Publish XUnit Test Results + inputs: + testRunner: VSTest + testResultsFiles: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/*.trx' + mergeTestResults: true + condition: and(succeededOrFailed(), eq(variables['_BuildConfig'], 'Debug'), eq(variables['_Platform'], 'x64')) + + # Upload code coverage data + - script: dotnet msbuild -binaryLogger:artifacts\log\$(_BuildConfig)\uploadCodeCov.binlog;ProjectImports=Embed -restore eng/CodeCoverage.proj + displayName: Upload coverage to codecov.io + condition: and(succeeded(), eq(variables['_Coverage'], True), eq(variables['_BuildConfig'], 'Debug'), eq(variables['_Platform'], 'x64')) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 819f309f317..d4de934200d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,23 +1,5 @@ -# This is a simple wrapper for eng/pipeline.yml to get around the limitation of -# user-defined variables not being available in yaml template expressions. - -# Parameters ARE available in template expressions, and parameters can have default values -variables: -# clean the local repo on the build agents -- name: Build.Repository.Clean - value: true -- name: _DotNetArtifactsCategory - value: WINDOWSDESKTOP -- name: _DotNetValidationArtifactsCategory - value: WINDOWSDESKTOP -- ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}: - - name: PostBuildSign - value: false -- ${{ else }}: - - name: PostBuildSign - value: true -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - group: DotNet-Wpf-SDLValidation-Params +# This pipeline does not do any real building of assets. It just publishing commit info to Maestro, which is used to trigger codeflow to the VMR. +# All building of assets happens in the VMR. trigger: batch: true branches: @@ -29,6 +11,8 @@ trigger: paths: exclude: - Documentation/* +pr: none + resources: repositories: - repository: 1ESPipelineTemplates @@ -38,35 +22,32 @@ resources: extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates parameters: - sdl: - policheck: - enabled: true - tsa: - enabled: true - configFile: '$(Build.SourcesDirectory)/eng/tsaoptions.json' - featureFlags: - autoBaseline: true - # This prefast enablement causes compilation issues in STL. - autoEnablePREfastWithNewRuleset: false pool: name: NetCore1ESPool-Internal image: 1es-windows-2022 os: windows - customBuildTags: - - ES365AIMigrationTooling stages: - stage: build displayName: Build jobs: - - template: /eng/pipeline.yml@self - parameters: - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - runAsPublic: false - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - template: /eng/common/templates-official/post-build/post-build.yml@self + - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}: + - template: /eng/common/templates-official/job/onelocbuild.yml@self + parameters: + MirrorRepo: wpf + LclSource: lclFilesfromPackage + LclPackageId: 'LCL-JUNO-PROD-WPF' + - template: /eng/common/templates-official/jobs/jobs.yml@self parameters: - publishingInfraVersion: 3 - enableSymbolValidation: false - enableSigningValidation: false - enableNugetValidation: false - enableSourceLinkValidation: false \ No newline at end of file + enablePublishBuildArtifacts: true + enablePublishBuildAssets: false + enablePublishTestResults: false + publishAssetsImmediately: true + isAssetlessBuild: true + enableTelemetry: true + enableSourceIndex: true + sourceIndexParams: + condition: eq(variables['Build.SourceBranch'], 'refs/heads/main') + binlogPath: artifacts/log/Debug/x86/Build.binlog + pool: + name: NetCore1ESPool-Internal + demands: ImageOverride -equals windows.vs2022.amd64 \ No newline at end of file diff --git a/azure-pipelines1.yml b/azure-pipelines1.yml deleted file mode 100644 index d1e1c259302..00000000000 --- a/azure-pipelines1.yml +++ /dev/null @@ -1,68 +0,0 @@ -# This is a simple wrapper for eng/pipeline.yml to get around the limitation of -# user-defined variables not being available in yaml template expressions. - -# Parameters ARE available in template expressions, and parameters can have default values, -# so they can be used to control yaml flow. -# - -variables: - # clean the local repo on the build agents - - name: Build.Repository.Clean - value: true - - name: _PublishUsingPipelines - value: true - - name: _DotNetArtifactsCategory - value: WINDOWSDESKTOP - - name: _DotNetValidationArtifactsCategory - value: WINDOWSDESKTOP - - name: PostBuildSign - value: true - - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - group: DotNet-Wpf-SDLValidation-Params - - -# This is set in the pipeline directly -# When set to false, CI tests will not be enabled in builds. -# -# _ContinuousIntegrationTestsEnabled: false - -# Setting batch to true, triggers one build at a time. -# if there is a push while a build in progress, it will wait, -# until the running build finishes, and produce a build with all the changes -# -# only trigger ci builds for the master and release branches -trigger: - batch: true - branches: - include: - - ctp - - feature/* - paths: - exclude: - - Documentation/* - -pr: - autoCancel: true - branches: - include: - - ctp - paths: - exclude: - - Documentation/* - -# Call the pipeline.yml template, which does the real work -stages: -- stage: build - displayName: Build - jobs: - - template: /eng/wpfautomatedtests.yml - parameters: - enablePublishUsingPipelines: $(_PublishUsingPipelines) - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - # agent pool can't be read from a user-defined variable (Azure DevOps limitation) - pool: - name: NetCore1ESPool-Internal - demands: ImageOverride -equals windows.vs2022preview.amd64 - # runAsPublic is used in expressions, which can't read from user-defined variables - runAsPublic: false diff --git a/eng/pipeline-pr.yml b/eng/pipeline-pr.yml deleted file mode 100644 index 0c7818b64fc..00000000000 --- a/eng/pipeline-pr.yml +++ /dev/null @@ -1,314 +0,0 @@ -# -# This file should be kept in sync across https://www.github.com/dotnet/wpf and dotnet-wpf-int repos. -# -# - -parameters: - # Needed because runAsPublic is used in template expressions, which can't read from user-defined variables - # Defaults to true - runAsPublic: true - repoName: dotnet/wpf - TSAEnabled: true - -jobs: -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}: - - template: /eng/common/templates/job/onelocbuild.yml - parameters: - MirrorRepo: wpf - LclSource: lclFilesfromPackage - LclPackageId: 'LCL-JUNO-PROD-WPF' -- template: /eng/common/templates/jobs/jobs.yml - parameters: - enableMicrobuild: true - enablePublishBuildArtifacts: true - enablePublishTestResults: false # tests run in helix - enablePublishBuildAssets: true - enablePublishUsingPipelines: true - enableTelemetry: true - enableSourceIndex: true - sourceIndexParams: - condition: eq(variables['Build.SourceBranch'], 'refs/heads/main') - binlogPath: artifacts/log/Debug/x86/Build.binlog - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Public - demands: ImageOverride -equals windows.vs2022preview.amd64.Open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Internal - demands: ImageOverride -equals windows.vs2022preview.amd64 - helixRepo: $(repoName) - - jobs: - - job: Windows_NT - timeoutInMinutes: 120 # how long to run the job before automatically cancelling; see https://github.com/dotnet/wpf/issues/952 - pool: - # For public jobs, use the hosted pool. For internal jobs use the internal pool. - # Will eventually change this to two BYOC pools. - # agent pool can't be read from a user-defined variable (Azure DevOps limitation) - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Public - demands: ImageOverride -equals windows.vs2022preview.amd64.Open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Internal - demands: ImageOverride -equals windows.vs2022preview.amd64 - variables: - - name: Codeql.Enabled - value: true - - name: Codeql.TSAEnabled - value: ${{ parameters.TSAEnabled }} - - name: Codeql.TSAOptionsPath - value: $(Build.SourcesDirectory)/eng/tsaoptions.json - # needed for signing - - name: _TeamName - value: DotNetCore - - name: _SignType - value: real - - name: _SignArgs - value: '' - - name: _PublishArgs - value: '' - - name: _OfficialBuildIdArgs - value: '' - - name: _Platform - value: x86 - - name: _PlatformArgs - value: /p:Platform=$(_Platform) - - name: _PublicBuildPipeline # We will run Helix tests when building in the open, but do not repeat when building and publishing again using the internal build-pipeline - value: true - - name: _TestHelixAgentPool - value: 'Windows.10.Amd64.ClientRS5.Open' # Preferred:'Windows.10.Amd64.Open%3bWindows.7.Amd64.Open%3bWindows.10.Amd64.ClientRS5.Open'; See https://github.com/dotnet/wpf/issues/952 - - name: _HelixStagingDir - value: $(BUILD.STAGINGDIRECTORY)\helix\functests - - name: _HelixSource - value: ${{ parameters.repoName }}/$(Build.SourceBranch) - - name: _HelixToken - value: '' - - name: _HelixCreator - value: ${{ parameters.repoName }} - - name: _programfilesx86 - value: ${Env:ProgramFiles(x86)}/dotnet - - name: _programfiles - value: ${Env:ProgramFiles}/dotnet - - ${{ if ne(variables['System.TeamProject'], 'internal') }}: - - name: _InternalRuntimeDownloadArgs - value: '' - - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - group: AzureDevOps-Artifact-Feeds-Pats - - name: _InternalRuntimeDownloadArgs - value: >- - /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal - /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) - - - # Override some values if we're building internally - - ${{ if eq(parameters.runAsPublic, 'false') }}: - # note: You have to use list syntax here (- name: value) or you will get errors about declaring the same variable multiple times - - name: _SignType - value: test - - group: DotNet-HelixApi-Access - - # note: Even though they are referenced here, user defined variables (like $(_SignType)) are not resolved - # until the agent is running on the machine. They can be overridden any time before they are resolved, - # like in the job matrix below (see Build_Debug) - - name: _SignArgs - value: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) - - name: _PublishArgs - value: /p:DotNetPublishUsingPipelines=true - - name: _OfficialBuildIdArgs - value: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - - name: _PublicBuildPipeline - value: false - - name: _HelixSource - value: official/${{ parameters.repoName }}/$(Build.SourceBranch) - - name: _HelixToken - value: '$(HelixApiAccessToken)' # from DotNet-HelixApi-Access group - - name: _HelixCreator - value: '' #if _HelixToken is set, Creator must be empty - - name: _TestHelixAgentPool - value: 'Windows.10.Amd64.ClientRS5' # Preferred: 'Windows.10.Amd64%3bWindows.7.Amd64%3bWindows.10.Amd64.ClientRS5' - - strategy: - matrix: - ${{ if eq(parameters.runAsPublic, 'true') }}: - Build_Debug_x86: - _BuildConfig: Debug - # override some variables for debug - # _SignType has to be real for package publishing to succeed - do not override to test. - Build_Release_x86: - _BuildConfig: Release - ${{ if eq(parameters.runAsPublic, 'true') }}: - Build_Debug_x64: - _BuildConfig: Debug - _Coverage: true - # override some variables for debug - # _SignType has to be real for package publishing to succeed - do not override to test. - _Platform: x64 - Build_Release_x64: - _BuildConfig: Release - _Platform: x64 - ${{ if eq(parameters.runAsPublic, 'true') }}: - Build_Debug_arm64: - _BuildConfig: Debug - # override some variables for debug - # _SignType has to be real for package publishing to succeed - do not override to test. - _Platform: arm64 - Build_Release_arm64: - _BuildConfig: Release - _Platform: arm64 - steps: - - checkout: self - clean: true - - # Set VSO Variable(s) - - powershell: eng\pre-build.ps1 - displayName: Pre-Build - Set VSO Variables - - - template: /eng/common/templates/steps/enable-internal-sources.yml - - template: /eng/common/templates/steps/enable-internal-runtimes.yml - - # Use utility script to run script command dependent on agent OS. - - script: eng\scripts\cibuild.cmd - -configuration $(_BuildConfig) - -prepareMachine - $(_PublishArgs) - $(_SignArgs) - $(_OfficialBuildIdArgs) - $(_PlatformArgs) - $(_InternalRuntimeDownloadArgs) - /p:Coverage=$(_Coverage) - displayName: Windows Build / Publish - # This condition should be kept in sync with the condition for 'Run DRTs' step - # When building on a regular pipeline (!_HelixPipeline), build as usual - # When building on a Helix pipeline, only build Release configs - # (!_HelixPipeline) || - # (_HelixPipeline && _PublicBuildPipeline && _ContinuousIntegrationTestsEnabled && _BuildConfig == Release) - condition: or(ne(variables['_HelixPipeline'], 'true'), and(eq(variables['_HelixPipeline'], 'true') ,eq(variables['_BuildConfig'], 'Release'), eq(variables['_PublicBuildPipeline'], 'true'), eq(variables['_ContinuousIntegrationTestsEnabled'], 'true'))) - - - script: eng\scripts\ciunittest.cmd - -configuration $(_BuildConfig) - -prepareMachine - $(_PublishArgs) - $(_SignArgs) - $(_OfficialBuildIdArgs) - $(_PlatformArgs) - $(_InternalRuntimeDownloadArgs) - /bl:$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)\Test.binlog - /p:Coverage=$(_Coverage) - displayName: Run xUnit Tests - condition: and(or(ne(variables['_HelixPipeline'], 'true'), and(eq(variables['_HelixPipeline'], 'true'), eq(variables['_PublicBuildPipeline'], 'true'), eq(variables['_ContinuousIntegrationTestsEnabled'], 'true'))), eq(variables['_Platform'], 'x64')) - - - task: PublishTestResults@2 - displayName: Publish XUnit Test Results - inputs: - testRunner: VSTest - testResultsFiles: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/*.trx' - mergeTestResults: true - condition: and(succeededOrFailed(), eq(variables['_BuildConfig'], 'Debug'), eq(variables['_Platform'], 'x64')) - - # Upload code coverage data - - script: dotnet msbuild -binaryLogger:artifacts\log\$(_configuration)\uploadCodeCov.binlog;ProjectImports=Embed -restore eng/CodeCoverage.proj - displayName: Upload coverage to codecov.io - condition: and(succeeded(), eq(variables['_Coverage'], True), eq(variables['_BuildConfig'], 'Debug'), eq(variables['_Platform'], 'x64')) - # - task: PowerShell@2 - # displayName: Install .NET Core - # inputs: - # filePath: $(Build.SourcesDirectory)/dotnet-test-install.ps1 - # arguments: -InstallDir $(_programfiles) -Architecture $(_Platform) -Runtime dotnet -Channel 9.0 -Quality daily - # condition: eq(variables['_Platform'], 'x64') - - # - task: PowerShell@2 - # displayName: Install .NET Core(x86) - # inputs: - # filePath: $(Build.SourcesDirectory)/dotnet-test-install.ps1 - # arguments: -InstallDir $(_programfilesx86) -Architecture $(_Platform) -Runtime dotnet -Channel 9.0 -Quality daily - # condition: eq(variables['_Platform'], 'x86') - - # - task: PowerShell@2 - # displayName: Install .NET WindowsDesktop - # inputs: - # filePath: $(Build.SourcesDirectory)/dotnet-test-install.ps1 - # arguments: -InstallDir $(_programfiles) -Architecture $(_Platform) -Runtime windowsdesktop -Channel 9.0 -Quality daily - # condition: eq(variables['_Platform'], 'x64') - - # - task: PowerShell@2 - # displayName: Install .NET WindowsDesktop(x86) - # inputs: - # filePath: $(Build.SourcesDirectory)/dotnet-test-install.ps1 - # arguments: -InstallDir $(_programfilesx86) -Architecture $(_Platform) -Runtime windowsdesktop -Channel 9.0 -Quality daily - # condition: eq(variables['_Platform'], 'x86') - - # - task: PowerShell@2 - # displayName: Replace WPF binaries - # inputs: - # targetType: 'inline' - # script: '.\eng\copy-wpf.ps1 -testhost -destination .dotnet -$(_BuildConfig) -arch $(_Platform)' - # condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['_Platform'], 'arm64')) - - # - task: DownloadPipelineArtifact@2 - # displayName: Fetch Test Binaries - # inputs: - # buildType: 'specific' - # project: 'cbb18261-c48f-4abb-8651-8cdcb5474649' - # pipeline: '81' - # buildVersionToDownload: 'latestFromBranch' - # branchName: 'refs/heads/main' - # downloadPath: '$(System.ArtifactsDirectory)\testbinzip\' - # checkDownloadedFiles: true - # artifactName: Tests.$(_BuildConfig).$(_Platform).zip - # condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['_Platform'], 'arm64')) - - # - task: ExtractFiles@1 - # displayName: Extract Test Bins - # inputs: - # archiveFilePatterns: '$(System.ArtifactsDirectory)\testbinzip\*.zip' - # destinationFolder: '$(System.ArtifactsDirectory)\testbins' - # cleanDestinationFolder: true - # overwriteExistingFiles: true - # condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['_Platform'], 'arm64')) - - # - task: PowerShell@2 - # displayName: Run Tests - # inputs: - # targetType: 'inline' - # script: '.\CIRunDrts.cmd' - # workingDirectory: '$(System.ArtifactsDirectory)\testbins' - # condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['_Platform'], 'arm64')) - - # - task: CopyFiles@2 - # inputs: - # SourceFolder: 'C:\Users\cloudtest\AppData\Roaming\QualityVault\Run\Report\' - # Contents: '**' - # TargetFolder: '$(System.DefaultWorkingDirectory)\Results\' - # CleanTargetFolder: true - # OverWrite: true - # condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x64'), eq(variables['_BuildConfig'], 'Release')) - - # - task: CopyFiles@2 - # inputs: - # SourceFolder: 'C:\Users\cloudtest\AppData\Roaming\QualityVault\Run\Report\' - # Contents: '**' - # TargetFolder: '$(System.DefaultWorkingDirectory)\ResultsX86\' - # CleanTargetFolder: true - # OverWrite: true - # condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x86'), eq(variables['_BuildConfig'], 'Release')) - - # - task: PublishPipelineArtifact@1 - # inputs: - # artifactName: 'TestResultsX64' - # targetPath: '$(System.DefaultWorkingDirectory)\Results\' - # condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x64'), eq(variables['_BuildConfig'], 'Release')) - - # - task: PublishPipelineArtifact@1 - # inputs: - # artifactName: 'TestResultsX86' - # targetPath: '$(System.DefaultWorkingDirectory)\ResultsX86\' - # condition: and(eq(variables['System.TeamProject'], 'public'), eq(variables['_Platform'], 'x86'), eq(variables['_BuildConfig'], 'Release')) - - # - task: PublishTestResults@2 - # inputs: - # testResultsFormat: 'XUnit' - # testResultsFiles: 'testResults.xml' - # searchFolder: '$(System.DefaultWorkingDirectory)\Results\' - # testRunTitle: 'Test results' - # mergeTestResults: true - # condition: eq(variables['System.TeamProject'], 'public') \ No newline at end of file diff --git a/eng/pipeline.yml b/eng/pipeline.yml deleted file mode 100644 index b2712faca3a..00000000000 --- a/eng/pipeline.yml +++ /dev/null @@ -1,156 +0,0 @@ -# -# This file should be kept in sync across https://www.github.com/dotnet/wpf and dotnet-wpf-int repos. -# -# -parameters: - runAsPublic: true - repoName: dotnet/wpf - TSAEnabled: true -jobs: -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}: - - template: /eng/common/templates-official/job/onelocbuild.yml@self - parameters: - MirrorRepo: wpf - LclSource: lclFilesfromPackage - LclPackageId: 'LCL-JUNO-PROD-WPF' -- template: /eng/common/templates-official/jobs/jobs.yml@self - parameters: - enableMicrobuild: true - enablePublishBuildArtifacts: true - enablePublishTestResults: false # tests run in helix - enablePublishBuildAssets: true - enablePublishUsingPipelines: true - enableTelemetry: true - enableSourceIndex: true - sourceIndexParams: - condition: eq(variables['Build.SourceBranch'], 'refs/heads/main') - binlogPath: artifacts/log/Debug/x86/Build.binlog - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Public - demands: ImageOverride -equals windows.vs2022preview.amd64.Open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Internal - demands: ImageOverride -equals windows.vs2022preview.amd64 - helixRepo: $(repoName) - jobs: - - job: Windows_NT - timeoutInMinutes: 120 # how long to run the job before automatically cancelling; see https://github.com/dotnet/wpf/issues/952 - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Public - demands: ImageOverride -equals windows.vs2022preview.amd64.Open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - name: NetCore1ESPool-Internal - demands: ImageOverride -equals windows.vs2022preview.amd64 - variables: - - name: Codeql.Enabled - value: true - - name: Codeql.TSAEnabled - value: ${{ parameters.TSAEnabled }} - - name: Codeql.TSAOptionsPath - value: $(Build.SourcesDirectory)/eng/tsaoptions.json - - name: _TeamName - value: DotNetCore - - name: _SignType - value: real - - name: _SignArgs - value: '' - - name: _PublishArgs - value: '' - - name: _OfficialBuildIdArgs - value: '' - - name: _Platform - value: x86 - - name: _PlatformArgs - value: /p:Platform=$(_Platform) - - name: _PublicBuildPipeline # We will run Helix tests when building in the open, but do not repeat when building and publishing again using the internal build-pipeline - value: true - - name: _TestHelixAgentPool - value: 'Windows.10.Amd64.ClientRS5.Open' #Preferred:'Windows.10.Amd64.Open%3bWindows.7.Amd64.Open%3bWindows.10.Amd64.ClientRS5.Open'; See https://github.com/dotnet/wpf/issues/952 - - name: _HelixStagingDir - value: $(BUILD.STAGINGDIRECTORY)\helix\functests - - name: _HelixSource - value: ${{ parameters.repoName }}/$(Build.SourceBranch) - - name: _HelixToken - value: '' - - name: _HelixCreator - value: ${{ parameters.repoName }} - - name: _programfilesx86 - value: ${Env:ProgramFiles(x86)}/dotnet - - name: _programfiles - value: ${Env:ProgramFiles}/dotnet - - ${{ if ne(variables['System.TeamProject'], 'internal') }}: - - name: _InternalRuntimeDownloadArgs - value: '' - - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - group: AzureDevOps-Artifact-Feeds-Pats - - name: _InternalRuntimeDownloadArgs - value: >- - /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) - - ${{ if eq(parameters.runAsPublic, 'false') }}: - # note: You have to use list syntax here (- name: value) or you will get errors about declaring the same variable multiple times - - name: _SignType - value: real - - group: DotNet-HelixApi-Access - - # note: Even though they are referenced here, user defined variables (like $(_SignType)) are not resolved - # until the agent is running on the machine. They can be overridden any time before they are resolved, - # like in the job matrix below (see Build_Debug) - - name: _SignArgs - value: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) - - name: _PublishArgs - value: /p:DotNetPublishUsingPipelines=true - - name: _OfficialBuildIdArgs - value: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - - name: _PublicBuildPipeline - value: false - - name: _HelixSource - value: official/${{ parameters.repoName }}/$(Build.SourceBranch) - - name: _HelixToken - value: '$(HelixApiAccessToken)' - - name: _HelixCreator - value: '' - - name: _TestHelixAgentPool - value: 'Windows.10.Amd64.ClientRS5' - strategy: - matrix: - ${{ if eq(parameters.runAsPublic, 'true') }}: - Build_Debug_x86: - _BuildConfig: Debug - # override some variables for debug - # _SignType has to be real for package publishing to succeed - do not override to test. - Build_Release_x86: - _BuildConfig: Release - ${{ if eq(parameters.runAsPublic, 'true') }}: - Build_Debug_x64: - _BuildConfig: Debug - # override some variables for debug - # _SignType has to be real for package publishing to succeed - do not override to test. - _Platform: x64 - Build_Release_x64: - _BuildConfig: Release - _Platform: x64 - ${{ if eq(parameters.runAsPublic, 'true') }}: - Build_Debug_arm64: - _BuildConfig: Debug - _Platform: arm64 - Build_Release_arm64: - _BuildConfig: Release - _Platform: arm64 - steps: - - powershell: eng\pre-build.ps1 - displayName: Pre-Build - Set VSO Variables - - - template: /eng/common/templates-official/steps/enable-internal-sources.yml - - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - - # Use utility script to run script command dependent on agent OS - - script: eng\scripts\cibuild.cmd -configuration $(_BuildConfig) -prepareMachine $(_PublishArgs) $(_SignArgs) $(_OfficialBuildIdArgs) $(_PlatformArgs) $(_InternalRuntimeDownloadArgs) - displayName: Windows Build / Publish - # This condition should be kept in sync with the condition for 'Run DRTs' step - # When building on a regular pipeline (!_HelixPipeline), build as usual - # When building on a Helix pipeline, only build Release configs - # (!_HelixPipeline) || - # (_HelixPipeline && _PublicBuildPipeline && _ContinuousIntegrationTestsEnabled && _BuildConfig == Release) - condition: or(ne(variables['_HelixPipeline'], 'true'), and(eq(variables['_HelixPipeline'], 'true') ,eq(variables['_BuildConfig'], 'Release'), eq(variables['_PublicBuildPipeline'], 'true'), eq(variables['_ContinuousIntegrationTestsEnabled'], 'true')))