From e126685892289e157da4950fb883761d10ff05da Mon Sep 17 00:00:00 2001 From: Dustin Howett Date: Tue, 8 Feb 2022 14:31:16 -0600 Subject: [PATCH 1/3] Publish appxsym symbols to public symbol server --- .github/actions/spelling/expect/expect.txt | 1 + build/pipelines/release.yml | 30 ++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/.github/actions/spelling/expect/expect.txt b/.github/actions/spelling/expect/expect.txt index 2f0a8a588e9..85ea31b952a 100644 --- a/.github/actions/spelling/expect/expect.txt +++ b/.github/actions/spelling/expect/expect.txt @@ -1460,6 +1460,7 @@ msctls msdata msdn msft +MSDL MSGCMDLINEF MSGF MSGFILTER diff --git a/build/pipelines/release.yml b/build/pipelines/release.yml index 300d66c68c1..c78d456cf9b 100644 --- a/build/pipelines/release.yml +++ b/build/pipelines/release.yml @@ -269,6 +269,36 @@ jobs: IndexSources: false SymbolServerType: TeamServices + - ${{ if eq(parameters.buildTerminal, true) }}: + # It seems easier to do this -- extract the appxsym -- than enumerate all the PDBs in the build directory for the + # public symbol push. Otherwise, we would have to list all of the PDB files one by one. + - pwsh: |- + mkdir $(Build.SourcesDirectory)/appxsym-temp + tar -x -v -f (Get-Item "$(Build.ArtifactStagingDirectory)/appx/*.appxsym").FullName -C $(Build.SourcesDirectory)/appxsym-temp + displayName: Extract symbols for public consumption + + # Publish the app symbols to the public MSDL symbol server + # accessible via https://msdl.microsoft.com/download/symbols + - task: PublishSymbols@2 + displayName: 'Publish app symbols to MSDL' + inputs: + symbolsFolder: '$(Build.SourcesDirectory)/appxsym-temp' + searchPattern: '**/*.pdb' + SymbolsMaximumWaitTime: 30 + SymbolServerType: 'TeamServices' + SymbolsProduct: 'Windows Terminal Application Binaries' + SymbolsVersion: '$(XES_APPXMANIFESTVERSION)' + # The ADO task does not support indexing of GitHub sources. + indexSources: false + detailedLog: true + # There is a bug which causes this task to fail if LIB includes an inaccessible path (even though it does not depend on it). + # To work around this issue, we just force LIB to be any dir that we know exists. + # Copied from https://github.com/microsoft/icu/blob/f869c214adc87415dfe751d81f42f1bca55dcf5f/build/azure-nuget.yml#L564-L583 + env: + LIB: $(Build.SourcesDirectory) + ArtifactServices_Symbol_AccountName: microsoftpublicsymbols + ArtifactServices_Symbol_PAT: $(ADO_microsoftpublicsymbols_PAT) + - ${{ if eq(parameters.runCompliance, true) }}: - template: ./templates/build-console-compliance-job.yml From a3f38f29dc530f6354688b85d460cb0d460d56a7 Mon Sep 17 00:00:00 2001 From: Dustin Howett Date: Tue, 8 Feb 2022 14:39:24 -0600 Subject: [PATCH 2/3] Do symbol publication all at once after appxbundle signing --- build/pipelines/release.yml | 72 +++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 31 deletions(-) diff --git a/build/pipelines/release.yml b/build/pipelines/release.yml index c78d456cf9b..ce1dfb69097 100644 --- a/build/pipelines/release.yml +++ b/build/pipelines/release.yml @@ -269,36 +269,6 @@ jobs: IndexSources: false SymbolServerType: TeamServices - - ${{ if eq(parameters.buildTerminal, true) }}: - # It seems easier to do this -- extract the appxsym -- than enumerate all the PDBs in the build directory for the - # public symbol push. Otherwise, we would have to list all of the PDB files one by one. - - pwsh: |- - mkdir $(Build.SourcesDirectory)/appxsym-temp - tar -x -v -f (Get-Item "$(Build.ArtifactStagingDirectory)/appx/*.appxsym").FullName -C $(Build.SourcesDirectory)/appxsym-temp - displayName: Extract symbols for public consumption - - # Publish the app symbols to the public MSDL symbol server - # accessible via https://msdl.microsoft.com/download/symbols - - task: PublishSymbols@2 - displayName: 'Publish app symbols to MSDL' - inputs: - symbolsFolder: '$(Build.SourcesDirectory)/appxsym-temp' - searchPattern: '**/*.pdb' - SymbolsMaximumWaitTime: 30 - SymbolServerType: 'TeamServices' - SymbolsProduct: 'Windows Terminal Application Binaries' - SymbolsVersion: '$(XES_APPXMANIFESTVERSION)' - # The ADO task does not support indexing of GitHub sources. - indexSources: false - detailedLog: true - # There is a bug which causes this task to fail if LIB includes an inaccessible path (even though it does not depend on it). - # To work around this issue, we just force LIB to be any dir that we know exists. - # Copied from https://github.com/microsoft/icu/blob/f869c214adc87415dfe751d81f42f1bca55dcf5f/build/azure-nuget.yml#L564-L583 - env: - LIB: $(Build.SourcesDirectory) - ArtifactServices_Symbol_AccountName: microsoftpublicsymbols - ArtifactServices_Symbol_PAT: $(ADO_microsoftpublicsymbols_PAT) - - ${{ if eq(parameters.runCompliance, true) }}: - template: ./templates/build-console-compliance-job.yml @@ -317,14 +287,17 @@ jobs: inputs: disableOutputRedirect: true - task: DownloadBuildArtifacts@0 - displayName: Download Artifacts (*.appx, *.msix) + displayName: Download Artifacts (*.appx, *.msix, *.appxsym) inputs: downloadType: specific itemPattern: >- **/*.msix **/*.appx + + **/*.appxsym extractTars: false + - task: PowerShell@2 displayName: Create WindowsTerminal*.msixbundle inputs: @@ -364,6 +337,43 @@ jobs: "ToolVersion": "1.0" } ] + + # It seems easier to do this -- download every appxsym -- then enumerate all the PDBs in the build directory for the + # public symbol push. Otherwise, we would have to list all of the PDB files one by one. + - pwsh: |- + mkdir $(Build.SourcesDirectory)/appxsym-temp + Get-Item "$(System.ArtifactsDirectory)" -Filter *.appxsym -Recurse | % { + $src = $_.FullName + $dest = Join-Path "$(Build.SourcesDirectory)/appxsym-temp/" $_.Name + + mkdir $dest + Write-Host "Extracting $src to $dest..." + tar -x -v -f $src -C $dest + } + displayName: Extract symbols for public consumption + + # Publish the app symbols to the public MSDL symbol server + # accessible via https://msdl.microsoft.com/download/symbols + - task: PublishSymbols@2 + displayName: 'Publish app symbols to MSDL' + inputs: + symbolsFolder: '$(Build.SourcesDirectory)/appxsym-temp' + searchPattern: '**/*.pdb' + SymbolsMaximumWaitTime: 30 + SymbolServerType: 'TeamServices' + SymbolsProduct: 'Windows Terminal Application Binaries' + SymbolsVersion: '$(XES_APPXMANIFESTVERSION)' + # The ADO task does not support indexing of GitHub sources. + indexSources: false + detailedLog: true + # There is a bug which causes this task to fail if LIB includes an inaccessible path (even though it does not depend on it). + # To work around this issue, we just force LIB to be any dir that we know exists. + # Copied from https://github.com/microsoft/icu/blob/f869c214adc87415dfe751d81f42f1bca55dcf5f/build/azure-nuget.yml#L564-L583 + env: + LIB: $(Build.SourcesDirectory) + ArtifactServices_Symbol_AccountName: microsoftpublicsymbols + ArtifactServices_Symbol_PAT: $(ADO_microsoftpublicsymbols_PAT) + - task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: appxbundle-signed' inputs: From faa5c29b0da3b2c887060696cc0c49153a6a3087 Mon Sep 17 00:00:00 2001 From: Dustin Howett Date: Tue, 8 Feb 2022 15:43:48 -0600 Subject: [PATCH 3/3] herpaderp --- build/pipelines/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pipelines/release.yml b/build/pipelines/release.yml index ce1dfb69097..99cbf44bbb3 100644 --- a/build/pipelines/release.yml +++ b/build/pipelines/release.yml @@ -342,7 +342,7 @@ jobs: # public symbol push. Otherwise, we would have to list all of the PDB files one by one. - pwsh: |- mkdir $(Build.SourcesDirectory)/appxsym-temp - Get-Item "$(System.ArtifactsDirectory)" -Filter *.appxsym -Recurse | % { + Get-ChildItem "$(System.ArtifactsDirectory)" -Filter *.appxsym -Recurse | % { $src = $_.FullName $dest = Join-Path "$(Build.SourcesDirectory)/appxsym-temp/" $_.Name