From 93988850a8c2cf1a5e18af09b3769cddddecad9d Mon Sep 17 00:00:00 2001 From: "reunion-maestro[bot]" <81196566+reunion-maestro[bot]@users.noreply.github.com> Date: Mon, 10 Jan 2022 17:07:57 -0800 Subject: [PATCH 1/2] Update dependencies from https://dev.azure.com/microsoft/ProjectReunion/_git/ProjectReunionInternal build Maestro-UpdateEngCommon_2201.10001 (#1962) Microsoft.WinAppSDK.EngCommon From Version 1.0.0-20211213.0-CI -> To Version 1.0.0-20220110.0-CI Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 16 ++-- eng/Versions.props | 2 +- .../WindowsAppSDK-Build-Steps.yml | 21 ++++- ...wsAppSDK-BuildAndIntegrationTest-Steps.yml | 45 ++++++++++ .../WindowsAppSDK-BuildSetup-Steps.yml | 18 +--- .../WindowsAppSDK-IntegrationTest-Steps.yml | 88 +++++++++++++++++++ global.json | 4 +- 7 files changed, 167 insertions(+), 27 deletions(-) create mode 100644 eng/common/AzurePipelinesTemplates/WindowsAppSDK-BuildAndIntegrationTest-Steps.yml create mode 100644 eng/common/AzurePipelinesTemplates/WindowsAppSDK-IntegrationTest-Steps.yml diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 871f21e079..95ef71e2a7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,25 +3,29 @@ https://github.com/microsoft/CsWinRT - + + https://github.com/microsoft/CsWinRT - + + https://github.com/microsoft/CsWinRT - + + https://github.com/microsoft/CsWinRT - + + - + https://dev.azure.com/microsoft/ProjectReunion/_git/ProjectReunionInternal - c29bc59c779108f3818a0efb0e467c2b4bb6cb47 + bc05e6cd828aed47148cb75597685d8cd59ae39d diff --git a/eng/Versions.props b/eng/Versions.props index df8e55f120..f766242b10 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -8,4 +8,4 @@ $(CsWinRTDependencyDotNetCoreSdkPackageVersion) - \ No newline at end of file + diff --git a/eng/common/AzurePipelinesTemplates/WindowsAppSDK-Build-Steps.yml b/eng/common/AzurePipelinesTemplates/WindowsAppSDK-Build-Steps.yml index c456bb28b4..4e2c9e0e41 100644 --- a/eng/common/AzurePipelinesTemplates/WindowsAppSDK-Build-Steps.yml +++ b/eng/common/AzurePipelinesTemplates/WindowsAppSDK-Build-Steps.yml @@ -11,6 +11,8 @@ # # The template eng\common\AzurePipelinesTemplates\WindowsAppSDK-BuildSetup-Steps.yml # will facilitate setting up the requirements to sucessfully run this template. +# In most cases, WindowsAppSDK-BuildSetup-Steps.yml should be called first, +# then WindowsAppSDK-Build-Steps.yml. # # The intended use of this yml template is for the feeder repos' pipeline to build the WinAppSDK package # with the latest versions from ProjectReunionInternal with the latest version of the transport package it @@ -18,6 +20,9 @@ # # The WindowsAppSDK Nuget package produced will be published to WindowsAppSDKNugetPackage build artifacts parameters: + - name: TransportPackageArtifactName + type: string + default: '' - name: BuildType displayName: "Build Type" type: string @@ -34,6 +39,14 @@ parameters: version: 1.0.0-stable steps: + - ${{ if ne(parameters.TransportPackageArtifactName, '') }}: + - task: DownloadBuildArtifacts@0 + inputs: + artifactName: ${{ parameters.TransportPackageArtifactName }} + downloadPath: '$(Build.SourcesDirectory)\build\packages' + itemPattern: | + **/*.nupkg + # Replace the versions in version.details.xml in the ProjectReunionInternal repo # Please note, the UpdateVersionDetailsConfig.ps1 that is used is one from the ProjectReunionInternal repo - ${{ each package in parameters.TransportPackages }}: @@ -47,7 +60,13 @@ steps: displayName: BuildAll inputs: filePath: 'BuildAll.ps1' - arguments: -WindowsAppSDKPackageVersion "" -BuildType ${{ parameters.BuildType }} -Checkpoint "none" -Platform "x86,x64,arm64" -Configuration "release,debug" + arguments: > + -WindowsAppSDKPackageVersion "" + -BuildType ${{ parameters.BuildType }} + -Checkpoint "none" + -Platform "x86,x64,arm64" + -Configuration "release,debug" + -YamlStep "none" - task: PublishBuildArtifacts@1 displayName: 'Publish Windows App SDK Packages' diff --git a/eng/common/AzurePipelinesTemplates/WindowsAppSDK-BuildAndIntegrationTest-Steps.yml b/eng/common/AzurePipelinesTemplates/WindowsAppSDK-BuildAndIntegrationTest-Steps.yml new file mode 100644 index 0000000000..6a70f87461 --- /dev/null +++ b/eng/common/AzurePipelinesTemplates/WindowsAppSDK-BuildAndIntegrationTest-Steps.yml @@ -0,0 +1,45 @@ +# This yml template combines WindowsAppSDK-BuildSetup, WindowsAppSDK-Build, +# and WindowsAppSDK-IntegrationTest templatesfor running the testAll script in ProjectReunionInternal +parameters: + - name: TransportPackageArtifactName + type: string + default: '' + - name: AzureSubscriptionServiceConnection + type: string + default: 'ProjectReunion Resource Manager' + - name: NuGetServiceConnectionName + type: string + default: 'ProjectReunionInternal' + - name: BuildType + displayName: "Build Type" + type: string + default: 'stable' + values: + - 'stable' + - 'experimental' + - name: "TransportPackages" + displayName: "TransportPackages to replace (name:version)" + type: object + default: + Foundation: + name: Microsoft.WindowsAppSDK.Foundation.TransportPackage + version: 1.0.0-stable + - name: TestSelection + type: string + default: "*" + +steps: + - template: WindowsAppSDK-BuildSetup-Steps.yml + parameters: + AzureSubscriptionServiceConnection: ${{ parameters.AzureSubscriptionServiceConnection }} + NuGetServiceConnectionName: ${{ parameters.NuGetServiceConnectionName }} + + - template: WindowsAppSDK-Build-Steps.yml + parameters: + TransportPackageArtifactName: ${{ parameters.TransportPackageArtifactName }} + BuildType: ${{ parameters.BuildType }} + TransportPackages: ${{ parameters.TransportPackages }} + + - template: WindowsAppSDK-IntegrationTest-Steps.yml + parameters: + TestSelection: ${{ parameters.TestSelection }} diff --git a/eng/common/AzurePipelinesTemplates/WindowsAppSDK-BuildSetup-Steps.yml b/eng/common/AzurePipelinesTemplates/WindowsAppSDK-BuildSetup-Steps.yml index afbcfe18b5..05947ebde6 100644 --- a/eng/common/AzurePipelinesTemplates/WindowsAppSDK-BuildSetup-Steps.yml +++ b/eng/common/AzurePipelinesTemplates/WindowsAppSDK-BuildSetup-Steps.yml @@ -13,25 +13,16 @@ # NuGetServiceConnectionName # Service connection name to ProjectReunion Internal feed # This is used to download other transport packages -# -# RefBranch -# The branch of the ProjectReunionInternal repository parameters: - - name: ArtifactName - type: string - default: '' - name: AzureSubscriptionServiceConnection type: string default: 'ProjectReunion Resource Manager' - name: NuGetServiceConnectionName type: string default: 'ProjectReunionInternal' - - name: RefBranch - type: string - default: 'main' steps: - - checkout: git://ProjectReunion/ProjectReunionInternal@${{ parameters.RefBranch }} + - checkout: git://ProjectReunion/ProjectReunionInternal - task: AzureKeyVault@1 inputs: @@ -40,13 +31,6 @@ steps: SecretsFilter: 'TestMSCert' RunAsPreJob: false - - task: DownloadBuildArtifacts@0 - inputs: - artifactName: ${{ parameters.ArtifactName }} - downloadPath: '$(Build.SourcesDirectory)\build\packages' - itemPattern: | - **/*.nupkg - # Setup for MyCert.pfx - task: PowerShell@2 name: CreateCert diff --git a/eng/common/AzurePipelinesTemplates/WindowsAppSDK-IntegrationTest-Steps.yml b/eng/common/AzurePipelinesTemplates/WindowsAppSDK-IntegrationTest-Steps.yml new file mode 100644 index 0000000000..328c9b4b03 --- /dev/null +++ b/eng/common/AzurePipelinesTemplates/WindowsAppSDK-IntegrationTest-Steps.yml @@ -0,0 +1,88 @@ +# This yml template is for running the testAll script in ProjectReunionInternal +# It downloads the WindowsAppSDK NuGetPackage from WindowsAppSDKNugetPackage (by default) +# +# Requirements: +# - This yml template can only be called from a pipeline in the "microsoft" AzureDevOps +# - Only the ProjectReunionInternal repository is checkout in the job +# +# The template eng\common\AzurePipelinesTemplates\WindowsAppSDK-BuildSetup-Steps.yml +# will facilitate setting up the requirements to sucessfully run this template. +# eng\common\AzurePipelinesTemplates\WindowsAppSDK-Build-Steps.yml will build the +# WindowsAppSDK Nuget Package for this template to use. +# +# In most cases, WindowsAppSDK-BuildSetup-Steps.yml should be called first, +# then WindowsAppSDK-Build-Steps.yml, and finally WindowsAppSDK-IntegrationTest-Steps.yml +# +# Parameters: +# WinAppSDkPackageArtifactName +# Name of the Artifact where the WindowsAppSDK NuGetPackage for the build lives + +parameters: + - name: WinAppSDkPackageArtifactName + type: string + default: "WindowsAppSDKNugetPackage" + - name: TestSelection + type: string + default: "*" + +steps: + - task: DownloadBuildArtifacts@0 + inputs: + artifactName: ${{ parameters.WinAppSDkPackageArtifactName }} + downloadPath: '$(Build.SourcesDirectory)\temp' + itemPattern: | + **/Microsoft.WindowsAppSDK.*.nupkg + + - task: PowerShell@2 + displayName: Extract WindowsAppSDKVersion + inputs: + targetType: 'inline' + script: | + Copy-Item -Path "$(Build.SourcesDirectory)\temp" -Destination "$(Build.SourcesDirectory)\PackLocation" -Recurse + + $files = Get-ChildItem $(Build.SourcesDirectory)\temp + foreach ($file in $files) # Iterate through each package we restored in the directory + { + Write-Host "file:" $file.FullName + $nupkgPaths = Get-ChildItem $file.FullName -Filter "*.nupkg" + + # Extract nupkg to access the nuspec + # The files in this directory does not contain the nuspec by default + foreach ($nupkgPath in $nupkgPaths) + { + Write-Host "nupkgPath:" $nupkgPath.FullName + $rename = $nupkgPath.Name + ".zip" + Rename-Item $nupkgPath.FullName $rename + $renamedFilePath = $nupkgPath.FullName + ".zip" + $dest = $file.FullName + "/contents" + Expand-Archive $renamedFilePath -Destination $dest + } + + $nuspecPaths = Get-ChildItem $file.FullName -Recurse -Filter "*.nuspec" + foreach ($nuspecPath in $nuspecPaths) + { + Write-Host "Found Nuspecs" + [xml]$nuspec = Get-Content -Path $nuspecPath.FullName + if ($nuspec.package.metadata.id -eq 'Microsoft.WindowsAppSDK') + { + $version = $nuspec.package.metadata.version + Write-Host "Found " $version + Write-Host "##vso[task.setvariable variable=WindowsAppSDKPackageVersion;]$version" + Exit 0 + } + } + } + Exit 1 + + - task: PowerShell@2 + name: TestAll + displayName: TestAll + inputs: + filePath: 'TestAll.ps1' + arguments: > + -WindowsAppSDKPackageVersion "$(WindowsAppSDKPackageVersion)" + -Checkpoint "none" -Platform "x64" + -Configuration "release" + -YamlStep "none" + -RunTestMachineSetup + -Name "${{ parameters.TestSelection }}" diff --git a/global.json b/global.json index c7d7c2c082..a5b3bee768 100644 --- a/global.json +++ b/global.json @@ -1,8 +1,8 @@ { "tools": { - "dotnet": "6.0.100" + "dotnet": "6.0.101" }, "msbuild-sdks": { - "Microsoft.WinAppSDK.EngCommon": "1.0.0-20211213.0-CI" + "Microsoft.WinAppSDK.EngCommon": "1.0.0-20220110.0-CI" } } From d605c1d358bbb50fd78c4549582523214e1c87c5 Mon Sep 17 00:00:00 2001 From: Kyaw Thant <48363984+kythant@users.noreply.github.com> Date: Tue, 11 Jan 2022 10:10:29 -0800 Subject: [PATCH 2/2] Run the Foundation test suite from the Internal Integraiton tests (#1963) --- build/ProjectReunion-BuildFoundation.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/build/ProjectReunion-BuildFoundation.yml b/build/ProjectReunion-BuildFoundation.yml index e8beb5b7b6..50a873c113 100644 --- a/build/ProjectReunion-BuildFoundation.yml +++ b/build/ProjectReunion-BuildFoundation.yml @@ -436,20 +436,18 @@ jobs: prereleaseVersionTag: nightly buildPool: $(ProjectReunionBuildPool) -# Build WinAppSDK -- job: IntegrationBuild +# Build WinAppSDK and Run Integration Test from TestAll.ps1 +- job: WinAppSDKIntegrationBuildAndTest dependsOn: ['CreateNugetPackage'] condition: succeeded() pool: $(ProjectReunionBuildPool) variables: WindowsAppSDKPackageVersion: $[ dependencies.CreateNugetPackage.outputs['SetVersion.packageVersion'] ] steps: - - template: ..\eng\common\AzurePipelinesTemplates\WindowsAppSDK-BuildSetup-Steps.yml - parameters: - ArtifactName: 'FullNuget' - - - template: ..\eng\common\AzurePipelinesTemplates\WindowsAppSDK-Build-Steps.yml + - template: ..\eng\common\AzurePipelinesTemplates\WindowsAppSDK-BuildAndIntegrationTest-Steps.yml parameters: + TestSelection: '*Foundation_*' + TransportPackageArtifactName: 'FullNuget' BuildType: 'stable' TransportPackages: FoundationPackage: @@ -460,7 +458,7 @@ jobs: - job: Publish dependsOn: - CreateNugetPackage - - IntegrationBuild + - WinAppSDKIntegrationBuildAndTest condition: succeeded() pool: $(ProjectReunionBuildPool) variables: @@ -489,4 +487,4 @@ jobs: parameters: AssetNames: 'Microsoft.WindowsAppSDK.Foundation.TransportPackage' AssetVersions: $(WindowsAppSDKPackageVersion) - TriggerSubscription: true \ No newline at end of file + TriggerSubscription: true