diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-AnyCPU-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-AnyCPU-Steps.yml index 274e08630a..05402f3ce0 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-AnyCPU-Steps.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-AnyCPU-Steps.yml @@ -5,6 +5,12 @@ parameters: - name: runPREfast type: boolean default: false +# When true, this template is being invoked from the monobuild context where +# the WindowsAppSDK monorepo IS the self repo. EsrpCodeSigning-Steps is invoked +# WITHOUT the @WinAppSDK suffix. +- name: IsMonobuild + type: boolean + default: false steps: - task: NuGetAuthenticate@1 @@ -53,16 +59,18 @@ steps: failOnAlert: false #changed true to false, temporary workaround for component governance blocking pipeline due to low .NET version - ${{ if eq(parameters.SignOutput, 'true') }}: - - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Steps.yml@WinAppSDK + - template: WindowsAppSDK-EsrpCodeSigning-Wrapper.yml parameters: - FolderPath: '$(build.SourcesDirectory)\BuildOutput' - UseMinimatch: true - Pattern: | - **/*.winmd - **/*.dll - **/*.exe - KeyCode: 'CP-230012' - displayName: 'Authenticode CodeSign Binaries' + IsMonobuild: ${{ parameters.IsMonobuild }} + InnerParams: + FolderPath: '$(build.SourcesDirectory)\BuildOutput' + UseMinimatch: true + Pattern: | + **/*.winmd + **/*.dll + **/*.exe + KeyCode: 'CP-230012' + displayName: 'Authenticode CodeSign Binaries' # Artifacts are uploaded via ob_outputDirectory where the each vPack Push jobs downloads from # so the CopyFiles below are to move all the vPack files to the right locations diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-Steps.yml index 6d2479029e..92c4edf350 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-Steps.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-Steps.yml @@ -8,6 +8,12 @@ parameters: - name: runPREfast type: boolean default: false +# When true, this template is being invoked from the monobuild context where +# the WindowsAppSDK monorepo IS the self repo. The shared EsrpCodeSigning-Steps +# template is invoked WITHOUT the @WinAppSDK suffix. +- name: IsMonobuild + type: boolean + default: false steps: - task: NuGetAuthenticate@1 @@ -132,16 +138,18 @@ steps: # continueOnError: true - ${{ if eq(parameters.SignOutput, 'true') }}: - - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Steps.yml@WinAppSDK + - template: WindowsAppSDK-EsrpCodeSigning-Wrapper.yml parameters: - FolderPath: '$(build.SourcesDirectory)\BuildOutput' - UseMinimatch: true - Pattern: | - **/*.winmd - **/*.dll - **/*.exe - KeyCode: 'CP-230012' - displayName: 'Authenticode CodeSign Binaries' + IsMonobuild: ${{ parameters.IsMonobuild }} + InnerParams: + FolderPath: '$(build.SourcesDirectory)\BuildOutput' + UseMinimatch: true + Pattern: | + **/*.winmd + **/*.dll + **/*.exe + KeyCode: 'CP-230012' + displayName: 'Authenticode CodeSign Binaries' # Artifacts are uploaded via ob_outputDirectory where the each vPack Push jobs downloads from # so the CopyFiles below are to move all the vPack files to the right locations diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildInstaller-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildInstaller-Steps.yml index 32f94a8e1e..85daa9a53b 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildInstaller-Steps.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildInstaller-Steps.yml @@ -11,6 +11,12 @@ parameters: - name: UseCurrentBuild type: boolean default: false +# When true, this template is being invoked from the monobuild context where +# the WindowsAppSDK monorepo IS the self repo. PublishSymbol-Steps and +# EsrpCodeSigning-Steps are invoked WITHOUT the @WinAppSDK suffix. +- name: IsMonobuild + type: boolean + default: false steps: - task: PowerShell@2 @@ -288,19 +294,23 @@ steps: failOnAlert: false condition: and(succeeded(), ne(variables.SkipInstallerBuild, true)) -- template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-PublishSymbol-Steps.yml@WinAppSDK +- template: WindowsAppSDK-PublishSymbol-Wrapper.yml parameters: - SearchPattern: '$(foundationRepoPath)BuildOutput\$(buildConfiguration)\$(buildPlatform)\WindowsAppRuntimeInstall\*.pdb' - IsOfficial: ${{ parameters.IsOfficial }} - condition: and(succeeded(), ne(variables.SkipInstallerBuild, true)) + IsMonobuild: ${{ parameters.IsMonobuild }} + InnerParams: + SearchPattern: '$(foundationRepoPath)BuildOutput\$(buildConfiguration)\$(buildPlatform)\WindowsAppRuntimeInstall\*.pdb' + IsOfficial: ${{ parameters.IsOfficial }} + condition: and(succeeded(), ne(variables.SkipInstallerBuild, true)) - ${{ if eq(parameters.SignOutput, 'true') }}: - - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Steps.yml@WinAppSDK + - template: WindowsAppSDK-EsrpCodeSigning-Wrapper.yml parameters: - FolderPath: $(foundationRepoPath)BuildOutput\$(buildConfiguration)\$(buildPlatform)\WindowsAppRuntimeInstall - Pattern: WindowsAppRuntimeInstall*.exe - UseMinimatch: true - KeyCode: 'CP-230012' + IsMonobuild: ${{ parameters.IsMonobuild }} + InnerParams: + FolderPath: $(foundationRepoPath)BuildOutput\$(buildConfiguration)\$(buildPlatform)\WindowsAppRuntimeInstall + Pattern: WindowsAppRuntimeInstall*.exe + UseMinimatch: true + KeyCode: 'CP-230012' - task: CopyFiles@2 displayName: 'Publish Installer' diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildMRT-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildMRT-Steps.yml index b650e5436c..1eb562b81f 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildMRT-Steps.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildMRT-Steps.yml @@ -8,6 +8,12 @@ parameters: - name: runPREfast type: boolean default: false +# When true, this template is being invoked from the monobuild context where +# the WindowsAppSDK monorepo IS the self repo. EsrpCodeSigning-Steps is invoked +# WITHOUT the @WinAppSDK suffix. +- name: IsMonobuild + type: boolean + default: false steps: - template: WindowsAppSDK-SetupBuildEnvironment-Steps.yml @@ -74,16 +80,18 @@ steps: - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 - ${{ if eq(parameters.SignOutput, 'true') }}: - - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Steps.yml@WinAppSDK + - template: WindowsAppSDK-EsrpCodeSigning-Wrapper.yml parameters: - FolderPath: '$(build.SourcesDirectory)\BuildOutput' - UseMinimatch: true - Pattern: | - **/*.winmd - **/*.dll - **/*.exe - KeyCode: 'CP-230012' - displayName: 'Authenticode CodeSign Binaries' + IsMonobuild: ${{ parameters.IsMonobuild }} + InnerParams: + FolderPath: '$(build.SourcesDirectory)\BuildOutput' + UseMinimatch: true + Pattern: | + **/*.winmd + **/*.dll + **/*.exe + KeyCode: 'CP-230012' + displayName: 'Authenticode CodeSign Binaries' - task: CopyFiles@2 displayName: MoveToOutputDirectory diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildVSIX-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildVSIX-Steps.yml index 1412ca9bb5..dc3e61154b 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildVSIX-Steps.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildVSIX-Steps.yml @@ -11,6 +11,12 @@ parameters: - name: UseCurrentBuild type: boolean default: false +# When true, this template is being invoked from the monobuild context where +# the WindowsAppSDK monorepo IS the self repo. PublishSymbol-Steps is invoked +# WITHOUT the @WinAppSDK suffix. +- name: IsMonobuild + type: boolean + default: false - name: OptionalVSIXVersion # if blank, the project template will select the version matching the Windows App SDK # nuget. If provided, it should be a 4-part dotted version ('1.2.3.4') @@ -193,10 +199,12 @@ steps: codeSignPattern: | **/WindowsAppSDK.*.Extension.*.dll -- template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-PublishSymbol-Steps.yml@WinAppSDK +- template: WindowsAppSDK-PublishSymbol-Wrapper.yml parameters: - SearchPattern: '$(FoundationRepoPath)dev\VSIX\BuildOutput\obj\AnyCPU$(buildConfiguration)\**\WindowsAppSDK*.pdb' - IsOfficial: ${{ parameters.IsOfficial }} + IsMonobuild: ${{ parameters.IsMonobuild }} + InnerParams: + SearchPattern: '$(FoundationRepoPath)dev\VSIX\BuildOutput\obj\AnyCPU$(buildConfiguration)\**\WindowsAppSDK*.pdb' + IsOfficial: ${{ parameters.IsOfficial }} - task: CopyFiles@2 displayName: 'Stage VSIX component JSONs' diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-ConvertWttLogToXUnit-Wrapper.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-ConvertWttLogToXUnit-Wrapper.yml new file mode 100644 index 0000000000..7dbc8e27d0 --- /dev/null +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-ConvertWttLogToXUnit-Wrapper.yml @@ -0,0 +1,18 @@ +# Wrapper for WindowsAppSDK-ConvertWttLogToXUnit-Steps.yml that dispatches to either +# @WinAppSDK (per-component pipelines) or @self (monobuild) at compile time. + +parameters: + - name: IsMonobuild + type: boolean + default: false + - name: InnerParams + type: object + default: {} + +steps: + - ${{ if parameters.IsMonobuild }}: + - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-ConvertWttLogToXUnit-Steps.yml@self + parameters: ${{ parameters.InnerParams }} + - ${{ else }}: + - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-ConvertWttLogToXUnit-Steps.yml@WinAppSDK + parameters: ${{ parameters.InnerParams }} diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-DetermineVersion-Wrapper.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-DetermineVersion-Wrapper.yml new file mode 100644 index 0000000000..54565092ea --- /dev/null +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-DetermineVersion-Wrapper.yml @@ -0,0 +1,18 @@ +# Wrapper for WindowsAppSDK-DetermineVersion-Steps.yml that dispatches to either +# @WinAppSDK (per-component pipelines) or @self (monobuild) at compile time. + +parameters: + - name: IsMonobuild + type: boolean + default: false + - name: InnerParams + type: object + default: {} + +steps: + - ${{ if parameters.IsMonobuild }}: + - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-DetermineVersion-Steps.yml@self + parameters: ${{ parameters.InnerParams }} + - ${{ else }}: + - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-DetermineVersion-Steps.yml@WinAppSDK + parameters: ${{ parameters.InnerParams }} diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Wrapper.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Wrapper.yml new file mode 100644 index 0000000000..9607e86f19 --- /dev/null +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Wrapper.yml @@ -0,0 +1,19 @@ +# Wrapper for WindowsAppSDK-EsrpCodeSigning-Steps.yml that dispatches to either +# @WinAppSDK (per-component pipelines) or @self (monobuild) at compile time. +# This eliminates if/else duplication at each call site. + +parameters: + - name: IsMonobuild + type: boolean + default: false + - name: InnerParams + type: object + default: {} + +steps: + - ${{ if parameters.IsMonobuild }}: + - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Steps.yml@self + parameters: ${{ parameters.InnerParams }} + - ${{ else }}: + - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Steps.yml@WinAppSDK + parameters: ${{ parameters.InnerParams }} diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Steps.yml index de24c8edb1..09ca5e5897 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Steps.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-PackTransportPackage-Steps.yml @@ -28,6 +28,14 @@ parameters: - name: mrtArtifactPrefix type: string default: 'MrtBinaries_release' + # When true, this template is being invoked from the monobuild context where + # the WindowsAppSDK monorepo IS the self repo. Shared templates (PublishSymbol, + # DetermineVersion, EsrpCodeSigning) are invoked WITHOUT @WinAppSDK suffix. + # When false (default, per-component pipeline context), shared templates are + # invoked via @WinAppSDK to reach the monobuild repo as a cross-repo resource. + - name: IsMonobuild + type: boolean + default: false steps: - task: NuGetAuthenticate@1 @@ -46,7 +54,10 @@ steps: pipeline: $(_foundationBuildOutputPipeline) pipelineId: $(_foundationBuildOutputBuildId) artifactName: "${{ parameters.foundationArtifactPrefix }}_${{ platform }}" - targetPath: '$(Build.SourcesDirectory)\BuildOutput' + ${{ if parameters.IsMonobuild }}: + targetPath: '$(Build.SourcesDirectory)\WindowsAppSDK\BuildOutput' + ${{ else }}: + targetPath: '$(Build.SourcesDirectory)\BuildOutput' # ── Download MRT build artifacts ── - ${{ each platform in split('x64;x86;arm64', ';') }}: @@ -59,65 +70,114 @@ steps: pipeline: $(_foundationBuildOutputPipeline) pipelineId: $(_foundationBuildOutputBuildId) artifactName: "${{ parameters.mrtArtifactPrefix }}_${{ platform }}" - targetPath: '$(Build.SourcesDirectory)\BuildOutput' + ${{ if parameters.IsMonobuild }}: + targetPath: '$(Build.SourcesDirectory)\WindowsAppSDK\BuildOutput' + ${{ else }}: + targetPath: '$(Build.SourcesDirectory)\BuildOutput' # ── Stage files + symbols ── + # In monobuild context: + # - Self (WinAppSDK monorepo) is checked out at $(Build.SourcesDirectory)\WinAppSDK + # - Foundation is checked out at $(Build.SourcesDirectory)\WindowsAppSDK + # BuildAll.ps1 (in Foundation root) reads the license at the relative path + # `WinAppSDK\Build\WindowsAppSDK\NuGetLicense\...`, resolved against its own + # location. Mirror it there from the monorepo's copy so BuildAll.ps1 finds it. + - ${{ if parameters.IsMonobuild }}: + - task: PowerShell@2 + displayName: 'Mirror NuGetLicense files to BuildAll.ps1-expected path (monobuild)' + inputs: + targetType: 'inline' + script: | + $src = Join-Path $env:BUILD_SOURCESDIRECTORY 'WinAppSDK\Build\WindowsAppSDK\NuGetLicense' + $dst = Join-Path $env:BUILD_SOURCESDIRECTORY 'WindowsAppSDK\WinAppSDK\Build\WindowsAppSDK\NuGetLicense' + if (-not (Test-Path $src)) { throw "Source NuGetLicense path not found: $src" } + New-Item -ItemType Directory -Force -Path (Split-Path $dst -Parent) | Out-Null + Copy-Item -Recurse -Force $src $dst + Write-Host "Mirrored $src -> $dst" + - task: PowerShell@2 name: StageFiles inputs: - filePath: 'BuildAll.ps1' + ${{ if parameters.IsMonobuild }}: + filePath: '$(Build.SourcesDirectory)\WindowsAppSDK\BuildAll.ps1' + workingDirectory: '$(Build.SourcesDirectory)\WindowsAppSDK' + ${{ else }}: + filePath: 'BuildAll.ps1' arguments: -Platform "x86,x64,arm64" -Configuration "release" -AzureBuildStep "StageFiles" - task: CopyFiles@2 displayName: 'Copy symbols to artifact staging directory' condition: always() inputs: - sourceFolder: $(Build.SourcesDirectory)\BuildOutput\FullNuget + ${{ if parameters.IsMonobuild }}: + sourceFolder: $(Build.SourcesDirectory)\WindowsAppSDK\BuildOutput\FullNuget + ${{ else }}: + sourceFolder: $(Build.SourcesDirectory)\BuildOutput\FullNuget contents: | **\*.pdb targetFolder: $(Build.ArtifactStagingDirectory)\symbols - - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-PublishSymbol-Steps.yml@WinAppSDK + - template: WindowsAppSDK-PublishSymbol-Wrapper.yml parameters: - SearchPattern: '$(Build.ArtifactStagingDirectory)\symbols\**\*.pdb' - IsOfficial: ${{ parameters.IsOfficial }} + IsMonobuild: ${{ parameters.IsMonobuild }} + InnerParams: + SearchPattern: '$(Build.ArtifactStagingDirectory)\symbols\**\*.pdb' + IsOfficial: ${{ parameters.IsOfficial }} # ── Determine version + pack NuGet ── - - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-DetermineVersion-Steps.yml@WinAppSDK + - template: WindowsAppSDK-DetermineVersion-Wrapper.yml parameters: - IsOfficial: ${{ parameters.IsOfficial }} + IsMonobuild: ${{ parameters.IsMonobuild }} + InnerParams: + IsOfficial: ${{ parameters.IsOfficial }} - task: PowerShell@2 name: SetVersion displayName: Update metapackage version inputs: targetType: 'inline' - script: | - $packageVersion = '$(WindowsAppSDKFormattedVersion)' - [xml]$publicNuspec = Get-Content -Path $(Build.SourcesDirectory)\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.TransportPackage.nuspec - $publicNuspec.package.metadata.version = $packageVersion - Set-Content -Value $publicNuspec.OuterXml $(Build.SourcesDirectory)\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.TransportPackage.nuspec + ${{ if parameters.IsMonobuild }}: + script: | + $packageVersion = '$(WindowsAppSDKFormattedVersion)' + [xml]$publicNuspec = Get-Content -Path $(Build.SourcesDirectory)\WindowsAppSDK\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.TransportPackage.nuspec + $publicNuspec.package.metadata.version = $packageVersion + Set-Content -Value $publicNuspec.OuterXml $(Build.SourcesDirectory)\WindowsAppSDK\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.TransportPackage.nuspec + ${{ else }}: + script: | + $packageVersion = '$(WindowsAppSDKFormattedVersion)' + [xml]$publicNuspec = Get-Content -Path $(Build.SourcesDirectory)\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.TransportPackage.nuspec + $publicNuspec.package.metadata.version = $packageVersion + Set-Content -Value $publicNuspec.OuterXml $(Build.SourcesDirectory)\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.TransportPackage.nuspec - task: PowerShell@2 name: PackNuget inputs: - filePath: 'BuildAll.ps1' + ${{ if parameters.IsMonobuild }}: + filePath: '$(Build.SourcesDirectory)\WindowsAppSDK\BuildAll.ps1' + workingDirectory: '$(Build.SourcesDirectory)\WindowsAppSDK' + ${{ else }}: + filePath: 'BuildAll.ps1' arguments: -Platform "x64" -Configuration "release" -AzureBuildStep "PackNuget" -OutputDirectory "$(build.artifactStagingDirectory)\FullNuget" -PackageVersion "$(WindowsAppSDKFormattedVersion)" -ComponentPackageVersion "$(WindowsAppSDKFormattedVersion)" -WindowsAppSDKVersionPinned "$(WindowsAppSDKVersionPinned)" # ── Sign ── - ${{ if eq(parameters.SignOutput, 'true') }}: - - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Steps.yml@WinAppSDK + - template: WindowsAppSDK-EsrpCodeSigning-Wrapper.yml parameters: - FolderPath: $(build.artifactStagingDirectory)\FullNuget - Pattern: 'Microsoft.WindowsAppSDK.Foundation*.nupkg' - KeyCode: 'CP-401405' - UseMinimatch: true + IsMonobuild: ${{ parameters.IsMonobuild }} + InnerParams: + FolderPath: $(build.artifactStagingDirectory)\FullNuget + Pattern: 'Microsoft.WindowsAppSDK.Foundation*.nupkg' + KeyCode: 'CP-401405' + UseMinimatch: true # ── Stage output ── - task: CopyFiles@2 displayName: MoveToOutputDirectory inputs: - SourceFolder: '$(Build.SourcesDirectory)\BuildOutput\FullNuget' + ${{ if parameters.IsMonobuild }}: + SourceFolder: '$(Build.SourcesDirectory)\WindowsAppSDK\BuildOutput\FullNuget' + ${{ else }}: + SourceFolder: '$(Build.SourcesDirectory)\BuildOutput\FullNuget' TargetFolder: '$(ob_outputDirectory)\NugetContent' - task: CopyFiles@2 diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-PublishSymbol-Wrapper.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-PublishSymbol-Wrapper.yml new file mode 100644 index 0000000000..6ebddff9f3 --- /dev/null +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-PublishSymbol-Wrapper.yml @@ -0,0 +1,18 @@ +# Wrapper for WindowsAppSDK-PublishSymbol-Steps.yml that dispatches to either +# @WinAppSDK (per-component pipelines) or @self (monobuild) at compile time. + +parameters: + - name: IsMonobuild + type: boolean + default: false + - name: InnerParams + type: object + default: {} + +steps: + - ${{ if parameters.IsMonobuild }}: + - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-PublishSymbol-Steps.yml@self + parameters: ${{ parameters.InnerParams }} + - ${{ else }}: + - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-PublishSymbol-Steps.yml@WinAppSDK + parameters: ${{ parameters.InnerParams }} diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml index ac99f1d19e..d5e134364b 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml @@ -7,6 +7,10 @@ parameters: testLocale: '' SamplesArtifactName: '' callingStage: '' + # When 'true', this template is being invoked from the monobuild context where + # the WindowsAppSDK monorepo IS the self repo. ConvertWttLogToXUnit-Steps is + # invoked WITHOUT the @WinAppSDK suffix. + IsMonobuild: 'false' steps: - task: powershell@2 @@ -231,13 +235,15 @@ steps: -wprProfilePath "$(Build.SourcesDirectory)\WinAppSDK\Build\WindowsAppSDK\src\test\AppModelProviders.wprp" -callingStage "${{ parameters.callingStage }}" - - template: Build/WindowsAppSDK/AzurePipelinesTemplates/WindowsAppSDK-ConvertWttLogToXUnit-Steps.yml@WinAppSDK + - template: WindowsAppSDK-ConvertWttLogToXUnit-Wrapper.yml parameters: - WttInputPath: '$(Build.SourcesDirectory)\TestOutput\$(buildConfiguration)\$(buildPlatform)\Te.wtl' - xunitOutputPath: '$(Build.SourcesDirectory)\TestOutput\$(buildConfiguration)\$(buildPlatform)\testResults-$(buildConfiguration)_$(buildPlatform)_${{ parameters.ImageName }}.xml' - TestNamePrefix: '$(buildConfiguration)_$(buildPlatform)_${{ parameters.ImageName }}' - BypassTests: '$(Build.SourcesDirectory)\test\BypassTests.json' - CheckoutPath: '$(Build.SourcesDirectory)\WinAppSDK\Build\WindowsAppSDK' + IsMonobuild: ${{ eq(parameters.IsMonobuild, 'true') }} + InnerParams: + WttInputPath: '$(Build.SourcesDirectory)\TestOutput\$(buildConfiguration)\$(buildPlatform)\Te.wtl' + xunitOutputPath: '$(Build.SourcesDirectory)\TestOutput\$(buildConfiguration)\$(buildPlatform)\testResults-$(buildConfiguration)_$(buildPlatform)_${{ parameters.ImageName }}.xml' + TestNamePrefix: '$(buildConfiguration)_$(buildPlatform)_${{ parameters.ImageName }}' + BypassTests: '$(Build.SourcesDirectory)\test\BypassTests.json' + CheckoutPath: '$(Build.SourcesDirectory)\WinAppSDK\Build\WindowsAppSDK' - task: PublishTestResults@2 displayName: 'Publish test results'