From b3f4d3fdc78935017bd31b2c725496e5d3a48cc8 Mon Sep 17 00:00:00 2001 From: John Fleisher Date: Wed, 17 Aug 2022 10:30:55 -0400 Subject: [PATCH] Publish Z3 symbols (#6280) * WiP: publish symbols for package * set debugtype to full * fix internal nuget feed publishing * Try pipeline github authorization * Update github service connection * WiP: try symbol publish in build * try Z3Prover for GitHub connection * WiP: collect symbols * revert symbol type to pdbonly (only portable is not supported for publishing) * Publish symbols in nightly and release * Revert this: comment out publish to test release build pipe * restore publishing * Turn of index sources to eliminate warning that it is not supported for Github Co-authored-by: Nikolaj Bjorner --- scripts/build-win-signed.yml | 16 ++++++++++++++ scripts/mk_util.py | 2 +- scripts/nightly.yaml | 41 +++++++++++++++++++++++++++++++----- scripts/release.yml | 9 +++----- 4 files changed, 56 insertions(+), 12 deletions(-) diff --git a/scripts/build-win-signed.yml b/scripts/build-win-signed.yml index 1b0bb111a..f2eba1892 100644 --- a/scripts/build-win-signed.yml +++ b/scripts/build-win-signed.yml @@ -22,6 +22,22 @@ jobs: python scripts\mk_win_dist.py --${{parameters.BuildArchitecture}}-only --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk + - task: CopyFiles@2 + displayName: 'Collect Symbols' + inputs: + sourceFolder: dist + contents: '**/*.pdb' + targetFolder: '$(Build.ArtifactStagingDirectory)/symbols' + # Publish symbol archive to match nuget package + # Index your source code and publish symbols to a file share or Azure Artifacts symbol server + - task: PublishSymbols@2 + inputs: + symbolsFolder: '$(Build.ArtifactStagingDirectory)/symbols' + searchPattern: '**/*.pdb' + indexSources: false # Github sources not supported + publishSymbols: true + symbolServerType: TeamServices + detailedLog: true - task: EsrpCodeSigning@1 displayName: Sign inputs: diff --git a/scripts/mk_util.py b/scripts/mk_util.py index 83171ab66..02a1a1fbf 100644 --- a/scripts/mk_util.py +++ b/scripts/mk_util.py @@ -1702,7 +1702,7 @@ class DotNetDLLComponent(Component): netstandard1.4 8.0 $(DefineConstants);DOTNET_CORE - portable + full Microsoft.Z3 Library Microsoft.Z3 diff --git a/scripts/nightly.yaml b/scripts/nightly.yaml index ea39d2ddd..3029774f3 100644 --- a/scripts/nightly.yaml +++ b/scripts/nightly.yaml @@ -147,6 +147,22 @@ stages: inputs: targetPath: $(Build.ArtifactStagingDirectory) artifactName: 'Windows32' + - task: CopyFiles@2 + displayName: 'Collect Symbols' + inputs: + sourceFolder: dist + contents: '**/*.pdb' + targetFolder: '$(Build.ArtifactStagingDirectory)/symbols' + # Publish symbol archive to match nuget package + # Index your source code and publish symbols to a file share or Azure Artifacts symbol server + - task: PublishSymbols@2 + inputs: + symbolsFolder: '$(Build.ArtifactStagingDirectory)/symbols' + searchPattern: '**/*.pdb' + indexSources: false # Github not supported + publishSymbols: true + symbolServerType: TeamServices + detailedLog: true - job: Windows64 displayName: "Windows 64-bit build" @@ -170,8 +186,22 @@ stages: inputs: targetPath: $(Build.ArtifactStagingDirectory) artifactName: 'Windows64' - - + - task: CopyFiles@2 + displayName: 'Collect Symbols' + inputs: + sourceFolder: dist + contents: '**/*.pdb' + targetFolder: '$(Build.ArtifactStagingDirectory)/symbols' + # Publish symbol archive to match nuget package + # Index your source code and publish symbols to a file share or Azure Artifacts symbol server + - task: PublishSymbols@2 + inputs: + symbolsFolder: '$(Build.ArtifactStagingDirectory)/symbols' + searchPattern: '**/*.pdb' + indexSources: false # Github not supported + publishSymbols: true + symbolServerType: TeamServices + detailedLog: true - stage: Package jobs: @@ -556,15 +586,16 @@ stages: displayName: 'NuGet Nightly x64 push' inputs: command: push - publishVstsFeed: 'Z3Nightly' + publishVstsFeed: 'Z3Build/Z3-Nightly-Builds' packagesToPush: $(Agent.TempDirectory)/x64/*.nupkg allowPackageConflicts: true - task: NuGetCommand@2 displayName: 'NuGet Nightly x86 push' inputs: command: push - publishVstsFeed: 'Z3Nightly' + publishVstsFeed: 'Z3Build/Z3-Nightly-Builds' packagesToPush: $(Agent.TempDirectory)/x86/*.nupkg allowPackageConflicts: true - + + # TBD: run regression tests on generated binaries. diff --git a/scripts/release.yml b/scripts/release.yml index 92ff9e14b..2a004d15f 100644 --- a/scripts/release.yml +++ b/scripts/release.yml @@ -56,8 +56,6 @@ stages: artifactName: 'MacArm64' targetPath: $(Build.ArtifactStagingDirectory) - - - job: UbuntuBuild displayName: "Ubuntu build" pool: @@ -87,7 +85,6 @@ stages: artifactName: 'UbuntuBuild' targetPath: $(Build.ArtifactStagingDirectory) - - job: UbuntuDoc displayName: "Ubuntu Doc build" pool: @@ -168,6 +165,7 @@ stages: ReleaseVersion: $(ReleaseVersion) BuildArchitecture: 'x86' + # Creates Z3 packages in various formats - stage: Package jobs: @@ -485,7 +483,7 @@ stages: path: $(Agent.TempDirectory) - task: GitHubRelease@0 inputs: - gitHubConnection: Z3-Pipeline-Github + gitHubConnection: Z3Prover repositoryName: $(Build.Repository.Name) action: 'create' target: '$(Build.SourceVersion)' @@ -498,7 +496,7 @@ stages: isDraft: true isPreRelease: true - # Enable on release (after fixing Nuget key) + - job: NuGetPublish condition: eq(1,0) displayName: "Publish to NuGet.org" @@ -518,7 +516,6 @@ stages: nuGetFeedType: External publishFeedCredentials: $(NugetZ3) packagesToPush: $(Agent.TempDirectory)/*.nupkg - # Enable on release: - job: PyPIPublish