3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 17:44:08 +00:00

Jfleisher/nightlynuget (#5916)

* WiP: Test nightly version number change

* Fix debug assert

* WiP: test nuget publish to AzDo feed for nightly build

* WiP: Make Nuget deploy separate stage

* WiP: fix nightly stage name

* change nuget push to vstsfeed

* Try case sensitive name for artifacts

* WiP: use artifact folder names

* add Rev version to package

* WiP: build def variation on nightly build version

* WiP: use Build_BuildNumber and Build_DefinitionName

* WiP: using hyphen in nightly version

* Tag nightly packages with datetime

* fix commit

* Build.BuildId and Build.DefinitionName

* WiP: change suffix format to lead with alpha

* test z3public feed publish

* revert public publish test

* WiP: test build# versioning scheme

* WiP: another variant on version number for nightly

Co-authored-by: jfleisher <jofleish@microsoft.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
John Fleisher 2022-03-22 15:19:58 -04:00 committed by GitHub
parent 815c971c9a
commit ce04c16a6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 60 additions and 10 deletions

View file

@ -1,5 +1,9 @@
variables:
ReleaseVersion: '4.8.16'
Major: '4'
Minor: '8'
Patch: '16'
NightlyVersion: $(Major).$(Minor).$(Patch).$(Build.BuildId)-$(Build.DefinitionName)
MacFlags: 'CXXFLAGS="-arch arm64 -arch x86_64" LINK_EXTRA_FLAGS="-arch arm64 -arch x86_64" SLINK_EXTRA_FLAGS="-arch arm64 -arch x86_64" FPMATH_ENABLED=False'
stages:
@ -131,6 +135,8 @@ stages:
targetPath: $(Build.ArtifactStagingDirectory)
artifactName: 'Windows64'
- stage: Package
jobs:
- job: NuGet64
@ -171,7 +177,7 @@ stages:
workingDirectory: $(Agent.TempDirectory)\package
arguments:
$(Agent.TempDirectory)\package
$(ReleaseVersion)
$(NightlyVersion)
$(Build.Repository.Uri)
$(Build.SourceBranchName)
$(Build.SourceVersion)
@ -181,13 +187,17 @@ stages:
displayName: 'NuGet Pack Symbols'
inputs:
command: custom
arguments: 'pack $(Agent.TempDirectory)\package\out\Microsoft.Z3.sym.nuspec -OutputDirectory $(Build.ArtifactStagingDirectory) -Verbosity detailed -Symbols -SymbolPackageFormat snupkg -BasePath $(Agent.TempDirectory)\package\out'
versioningScheme: byPrereleaseNumber
majorVersion: $(Major)
minorVersion: $(Minor)
patchVersion: $(Patch)
arguments: 'pack $(Agent.TempDirectory)\package\out\Microsoft.Z3.sym.nuspec -Version $(NightlyVersion) -OutputDirectory $(Build.ArtifactStagingDirectory) -Verbosity detailed -Symbols -SymbolPackageFormat snupkg -BasePath $(Agent.TempDirectory)\package\out'
- task: EsrpCodeSigning@1
displayName: 'Sign Package'
inputs:
ConnectedServiceName: 'z3-esrp-signing-2'
FolderPath: $(Build.ArtifactStagingDirectory)
Pattern: Microsoft.Z3.$(ReleaseVersion).nupkg
Pattern: Microsoft.Z3.$(NightlyVersion).nupkg
signConfigType: 'inlineSignParams'
inlineOperation: |
[
@ -214,7 +224,7 @@ stages:
inputs:
ConnectedServiceName: 'z3-esrp-signing-2'
FolderPath: $(Build.ArtifactStagingDirectory)
Pattern: Microsoft.Z3.$(ReleaseVersion).snupkg
Pattern: Microsoft.Z3.$(NightlyVersion).snupkg
signConfigType: 'inlineSignParams'
inlineOperation: |
[
@ -269,7 +279,7 @@ stages:
workingDirectory: $(Agent.TempDirectory)\package
arguments:
$(Agent.TempDirectory)\package
$(ReleaseVersion)
$(NightlyVersion)
$(Build.Repository.Uri)
$(Build.SourceBranchName)
$(Build.SourceVersion)
@ -280,13 +290,17 @@ stages:
displayName: 'NuGet Pack Symbols'
inputs:
command: custom
arguments: 'pack $(Agent.TempDirectory)\package\out\Microsoft.Z3.x86.sym.nuspec -OutputDirectory $(Build.ArtifactStagingDirectory) -Verbosity detailed -Symbols -SymbolPackageFormat snupkg -BasePath $(Agent.TempDirectory)\package\out'
versioningScheme: byPrereleaseNumber
majorVersion: $(Major)
minorVersion: $(Minor)
patchVersion: $(Patch)
arguments: 'pack $(Agent.TempDirectory)\package\out\Microsoft.Z3.x86.sym.nuspec -Version $(NightlyVersion) -OutputDirectory $(Build.ArtifactStagingDirectory) -Verbosity detailed -Symbols -SymbolPackageFormat snupkg -BasePath $(Agent.TempDirectory)\package\out'
- task: EsrpCodeSigning@1
displayName: 'Sign Package'
inputs:
ConnectedServiceName: 'z3-esrp-signing-2'
FolderPath: $(Build.ArtifactStagingDirectory)
Pattern: Microsoft.Z3.x86.$(ReleaseVersion).nupkg
Pattern: Microsoft.Z3.x86.$(NightlyVersion).nupkg
signConfigType: 'inlineSignParams'
inlineOperation: |
[
@ -313,7 +327,7 @@ stages:
inputs:
ConnectedServiceName: 'z3-esrp-signing-2'
FolderPath: $(Build.ArtifactStagingDirectory)
Pattern: Microsoft.Z3.x86.$(ReleaseVersion).snupkg
Pattern: Microsoft.Z3.x86.$(NightlyVersion).snupkg
signConfigType: 'inlineSignParams'
inlineOperation: |
[
@ -449,5 +463,41 @@ stages:
isDraft: false
isPreRelease: true
- stage: NugetPublishNightly
jobs:
# Publish to nightly feed on Azure
- job: NuGetPublishNightly
displayName: "Push nuget packages to Azure Feed"
steps:
- task: NuGetAuthenticate@0
displayName: 'NuGet Authenticate'
- task: NuGetToolInstaller@0
inputs:
versionSpec: 5.x
checkLatest: false
- task: DownloadPipelineArtifact@2
displayName: 'Download NuGet x86 Package'
inputs:
artifact: 'NuGet32'
path: $(Agent.TempDirectory)/x86
- task: DownloadPipelineArtifact@2
displayName: 'Download NuGet x64 Package'
inputs:
artifact: 'NuGet'
path: $(Agent.TempDirectory)/x64
- task: NuGetCommand@2
displayName: 'NuGet Nightly x64 push'
inputs:
command: push
publishVstsFeed: 'Z3Build/Z3-Nightly-builds'
packagesToPush: $(Agent.TempDirectory)/x64/*.nupkg
allowPackageConflicts: true
- task: NuGetCommand@2
displayName: 'NuGet Nightly x86 push'
inputs:
command: push
publishVstsFeed: 'Z3Build/Z3-Nightly-builds'
packagesToPush: $(Agent.TempDirectory)/x86/*.nupkg
allowPackageConflicts: true
# TBD: run regression tests on generated binaries.

View file

@ -405,7 +405,7 @@ namespace Microsoft.Z3
internal NativeSolver(NativeContext nativeCtx, Z3_solver z3solver)
{
Debug.Assert(nCtx != IntPtr.Zero);
Debug.Assert(nativeCtx != null);
Debug.Assert(z3solver != IntPtr.Zero);
this.ntvContext = nativeCtx;