mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 13:29:11 +00:00 
			
		
		
		
	add stages
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
		
							parent
							
								
									6c42e8068c
								
							
						
					
					
						commit
						b108f5163d
					
				
					 1 changed files with 247 additions and 243 deletions
				
			
		| 
						 | 
				
			
			@ -1,265 +1,269 @@
 | 
			
		|||
variables:
 | 
			
		||||
  ReleaseVersion: '4.8.10'
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
stages:
 | 
			
		||||
- stage: Build
 | 
			
		||||
  jobs:
 | 
			
		||||
 | 
			
		||||
- job: Mac
 | 
			
		||||
  displayName: "Mac Build"
 | 
			
		||||
  pool:
 | 
			
		||||
    vmImage: "macOS-latest"
 | 
			
		||||
  steps:
 | 
			
		||||
  - script: python scripts/mk_unix_dist.py --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk
 | 
			
		||||
  - script: git clone https://github.com/z3prover/z3test z3test
 | 
			
		||||
  - script: python z3test/scripts/test_benchmarks.py build-dist/z3 z3test/regressions/smt2    
 | 
			
		||||
  - script: cp dist/*.zip $(Build.ArtifactStagingDirectory)/.
 | 
			
		||||
  - task: PublishPipelineArtifact@0
 | 
			
		||||
    inputs:
 | 
			
		||||
      artifactName: 'Mac'
 | 
			
		||||
      targetPath: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
  - job: Mac
 | 
			
		||||
    displayName: "Mac Build"
 | 
			
		||||
    pool:
 | 
			
		||||
      vmImage: "macOS-latest"
 | 
			
		||||
    steps:
 | 
			
		||||
    - script: python scripts/mk_unix_dist.py --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk
 | 
			
		||||
    - script: git clone https://github.com/z3prover/z3test z3test
 | 
			
		||||
    - script: python z3test/scripts/test_benchmarks.py build-dist/z3 z3test/regressions/smt2    
 | 
			
		||||
    - script: cp dist/*.zip $(Build.ArtifactStagingDirectory)/.
 | 
			
		||||
    - task: PublishPipelineArtifact@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifactName: 'Mac'
 | 
			
		||||
        targetPath: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
 | 
			
		||||
- job: Ubuntu
 | 
			
		||||
  displayName: "Ubuntu build"
 | 
			
		||||
  pool:
 | 
			
		||||
    vmImage: "ubuntu-latest"
 | 
			
		||||
  steps:
 | 
			
		||||
  - script: python scripts/mk_unix_dist.py --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk
 | 
			
		||||
  - script: git clone https://github.com/z3prover/z3test z3test
 | 
			
		||||
  - script: python z3test/scripts/test_benchmarks.py build-dist/z3 z3test/regressions/smt2    
 | 
			
		||||
  - script: cp dist/*.zip $(Build.ArtifactStagingDirectory)/.
 | 
			
		||||
  - task: PublishPipelineArtifact@0
 | 
			
		||||
    inputs:
 | 
			
		||||
      artifactName: 'Ubuntu'
 | 
			
		||||
      targetPath: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
  - job: Ubuntu
 | 
			
		||||
    displayName: "Ubuntu build"
 | 
			
		||||
    pool:
 | 
			
		||||
      vmImage: "ubuntu-latest"
 | 
			
		||||
    steps:
 | 
			
		||||
    - script: python scripts/mk_unix_dist.py --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk
 | 
			
		||||
    - script: git clone https://github.com/z3prover/z3test z3test
 | 
			
		||||
    - script: python z3test/scripts/test_benchmarks.py build-dist/z3 z3test/regressions/smt2    
 | 
			
		||||
    - script: cp dist/*.zip $(Build.ArtifactStagingDirectory)/.
 | 
			
		||||
    - task: PublishPipelineArtifact@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifactName: 'Ubuntu'
 | 
			
		||||
        targetPath: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
 | 
			
		||||
- job: Manylinux
 | 
			
		||||
  displayName: "Manylinux build"
 | 
			
		||||
  pool:
 | 
			
		||||
    vmImage: "ubuntu-latest"
 | 
			
		||||
  container: "quay.io/pypa/manylinux2010_x86_64:latest"
 | 
			
		||||
  variables:
 | 
			
		||||
    python: "/opt/python/cp35-cp35m/bin/python"
 | 
			
		||||
  steps:
 | 
			
		||||
  - script: $(python) scripts/mk_unix_dist.py --nodotnet --nojava
 | 
			
		||||
  - script: git clone https://github.com/z3prover/z3test z3test
 | 
			
		||||
  - script: $(python) z3test/scripts/test_benchmarks.py build-dist/z3 z3test/regressions/smt2
 | 
			
		||||
  - script: cp dist/*.zip $(Build.ArtifactStagingDirectory)/
 | 
			
		||||
  - task: PublishPipelineArtifact@0
 | 
			
		||||
    inputs:
 | 
			
		||||
      artifactName: 'Manylinux'
 | 
			
		||||
      targetPath: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
  - job: Manylinux
 | 
			
		||||
    displayName: "Manylinux build"
 | 
			
		||||
    pool:
 | 
			
		||||
      vmImage: "ubuntu-latest"
 | 
			
		||||
    container: "quay.io/pypa/manylinux2010_x86_64:latest"
 | 
			
		||||
    variables:
 | 
			
		||||
      python: "/opt/python/cp35-cp35m/bin/python"
 | 
			
		||||
    steps:
 | 
			
		||||
    - script: $(python) scripts/mk_unix_dist.py --nodotnet --nojava
 | 
			
		||||
    - script: git clone https://github.com/z3prover/z3test z3test
 | 
			
		||||
    - script: $(python) z3test/scripts/test_benchmarks.py build-dist/z3 z3test/regressions/smt2
 | 
			
		||||
    - script: cp dist/*.zip $(Build.ArtifactStagingDirectory)/
 | 
			
		||||
    - task: PublishPipelineArtifact@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifactName: 'Manylinux'
 | 
			
		||||
        targetPath: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
 | 
			
		||||
- job: Windows32
 | 
			
		||||
  displayName: "Windows 32-bit build"
 | 
			
		||||
  pool:
 | 
			
		||||
    vmImage: "vs2017-win2016"
 | 
			
		||||
  steps:
 | 
			
		||||
  - task: CmdLine@2
 | 
			
		||||
    inputs:
 | 
			
		||||
      script:
 | 
			
		||||
        call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars32.bat" &&
 | 
			
		||||
        python scripts\mk_win_dist.py
 | 
			
		||||
  - job: Windows32
 | 
			
		||||
    displayName: "Windows 32-bit build"
 | 
			
		||||
    pool:
 | 
			
		||||
      vmImage: "vs2017-win2016"
 | 
			
		||||
    steps:
 | 
			
		||||
    - task: CmdLine@2
 | 
			
		||||
      inputs:
 | 
			
		||||
        script:
 | 
			
		||||
          call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars32.bat" &&
 | 
			
		||||
          python scripts\mk_win_dist.py
 | 
			
		||||
            --x86-only
 | 
			
		||||
            --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk
 | 
			
		||||
            --zip
 | 
			
		||||
  - task: CopyFiles@2
 | 
			
		||||
    inputs:
 | 
			
		||||
      sourceFolder: dist
 | 
			
		||||
      contents: '*.zip'
 | 
			
		||||
      targetFolder: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
  - task: PublishPipelineArtifact@1
 | 
			
		||||
    inputs:
 | 
			
		||||
      targetPath: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
      artifactName: 'Windows32'
 | 
			
		||||
    - task: CopyFiles@2
 | 
			
		||||
      inputs:
 | 
			
		||||
        sourceFolder: dist
 | 
			
		||||
        contents: '*.zip'
 | 
			
		||||
        targetFolder: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
    - task: PublishPipelineArtifact@1
 | 
			
		||||
      inputs:
 | 
			
		||||
        targetPath: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
        artifactName: 'Windows32'
 | 
			
		||||
 | 
			
		||||
- job: Windows64
 | 
			
		||||
  displayName: "Windows 64-bit build"
 | 
			
		||||
  pool:
 | 
			
		||||
    vmImage: "vs2017-win2016"
 | 
			
		||||
  steps:
 | 
			
		||||
  - task: CmdLine@2
 | 
			
		||||
    inputs:
 | 
			
		||||
      script:
 | 
			
		||||
        call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat" &&
 | 
			
		||||
        python scripts\mk_win_dist.py
 | 
			
		||||
  - job: Windows64
 | 
			
		||||
    displayName: "Windows 64-bit build"
 | 
			
		||||
    pool:
 | 
			
		||||
      vmImage: "vs2017-win2016"
 | 
			
		||||
    steps:
 | 
			
		||||
    - task: CmdLine@2
 | 
			
		||||
      inputs:
 | 
			
		||||
        script:
 | 
			
		||||
          call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat" &&
 | 
			
		||||
          python scripts\mk_win_dist.py
 | 
			
		||||
            --x64-only
 | 
			
		||||
            --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk
 | 
			
		||||
            --zip
 | 
			
		||||
  - task: CopyFiles@2
 | 
			
		||||
    inputs:
 | 
			
		||||
      sourceFolder: dist
 | 
			
		||||
      contents: '*.zip'
 | 
			
		||||
      targetFolder: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
  - task: PublishPipelineArtifact@1
 | 
			
		||||
    inputs:
 | 
			
		||||
      targetPath: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
      artifactName: 'Windows64'
 | 
			
		||||
    - task: CopyFiles@2
 | 
			
		||||
      inputs:
 | 
			
		||||
        sourceFolder: dist
 | 
			
		||||
        contents: '*.zip'
 | 
			
		||||
        targetFolder: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
    - task: PublishPipelineArtifact@1
 | 
			
		||||
      inputs:
 | 
			
		||||
        targetPath: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
        artifactName: 'Windows64'
 | 
			
		||||
 | 
			
		||||
- stage: Package
 | 
			
		||||
  jobs:
 | 
			
		||||
  - job: NuGet
 | 
			
		||||
    displayName: "NuGet packaging"
 | 
			
		||||
    dependsOn:
 | 
			
		||||
    - Mac
 | 
			
		||||
    - Ubuntu
 | 
			
		||||
    - Windows32
 | 
			
		||||
    - Windows64
 | 
			
		||||
    pool:
 | 
			
		||||
      vmImage: "windows-latest"
 | 
			
		||||
    steps:
 | 
			
		||||
    - powershell: write-host $(System.DefinitionId)
 | 
			
		||||
      displayName: 'System.DefinitionId'
 | 
			
		||||
    - powershell: write-host $(Build.BuildId)
 | 
			
		||||
      displayName: 'Build.BuildId'
 | 
			
		||||
    - powershell: write-host $(System.TeamProjectId)
 | 
			
		||||
      displayName: 'System.TeamProjectId'
 | 
			
		||||
    - task: DownloadPipelineArtifact@2
 | 
			
		||||
      displayName: 'Download Win64 Build'
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifact: 'Windows64'
 | 
			
		||||
        path: $(Agent.TempDirectory)\package
 | 
			
		||||
    - task: DownloadPipelineArtifact@2
 | 
			
		||||
      displayName: 'Download Ubuntu Build'
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifact: 'Ubuntu'
 | 
			
		||||
        path: $(Agent.TempDirectory)\package
 | 
			
		||||
    - task: DownloadPipelineArtifact@2
 | 
			
		||||
      displayName: 'Download macOS Build'
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifact: 'Mac'
 | 
			
		||||
        path: $(Agent.TempDirectory)\package
 | 
			
		||||
    - task: PythonScript@0
 | 
			
		||||
      displayName: 'Python: assemble files'
 | 
			
		||||
      inputs:
 | 
			
		||||
        scriptSource: 'filepath'
 | 
			
		||||
        scriptPath: scripts\mk_nuget_task.py
 | 
			
		||||
        workingDirectory: $(Agent.TempDirectory)\package
 | 
			
		||||
        arguments:
 | 
			
		||||
          $(Agent.TempDirectory)\package
 | 
			
		||||
          $(ReleaseVersion)
 | 
			
		||||
          $(Build.Repository.Uri)
 | 
			
		||||
          $(Build.SourceBranchName)
 | 
			
		||||
          $(Build.SourceVersion)
 | 
			
		||||
          $(Build.SourcesDirectory)
 | 
			
		||||
    - task: NuGetToolInstaller@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        versionSpec: 5.x
 | 
			
		||||
        checkLatest: false
 | 
			
		||||
    - task: NugetCommand@2
 | 
			
		||||
      displayName: 'NuGet Pack'
 | 
			
		||||
      inputs:
 | 
			
		||||
        command: pack
 | 
			
		||||
        packagesToPack: $(Agent.TempDirectory)\package\out\Microsoft.Z3.x64.nuspec
 | 
			
		||||
        basePath: $(Agent.TempDirectory)\package\out
 | 
			
		||||
        packDestination: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
        verbosityPack: detailed
 | 
			
		||||
    - task: NugetCommand@2
 | 
			
		||||
      displayName: 'NuGet Pack Symbols'
 | 
			
		||||
      inputs:
 | 
			
		||||
        command: pack
 | 
			
		||||
        packagesToPack: $(Agent.TempDirectory)\package\out\Microsoft.Z3.x64.nuspec
 | 
			
		||||
        basePath: $(Agent.TempDirectory)\package\out
 | 
			
		||||
        packDestination: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
        verbosityPack: detailed
 | 
			
		||||
        includeSymbols: true
 | 
			
		||||
 | 
			
		||||
- job: NuGet
 | 
			
		||||
  displayName: "NuGet packaging"
 | 
			
		||||
  dependsOn:
 | 
			
		||||
  - Mac
 | 
			
		||||
  - Ubuntu
 | 
			
		||||
  - Windows32
 | 
			
		||||
  - Windows64
 | 
			
		||||
  pool:
 | 
			
		||||
    vmImage: "windows-latest"
 | 
			
		||||
  steps:
 | 
			
		||||
  - powershell: write-host $(System.DefinitionId)
 | 
			
		||||
    displayName: 'System.DefinitionId'
 | 
			
		||||
  - powershell: write-host $(Build.BuildId)
 | 
			
		||||
    displayName: 'Build.BuildId'
 | 
			
		||||
  - powershell: write-host $(System.TeamProjectId)
 | 
			
		||||
    displayName: 'System.TeamProjectId'
 | 
			
		||||
  - task: DownloadPipelineArtifact@2
 | 
			
		||||
    displayName: 'Download Win64 Build'
 | 
			
		||||
    inputs:
 | 
			
		||||
      artifact: 'Windows64'
 | 
			
		||||
      path: $(Agent.TempDirectory)\package
 | 
			
		||||
  - task: DownloadPipelineArtifact@2
 | 
			
		||||
    displayName: 'Download Ubuntu Build'
 | 
			
		||||
    inputs:
 | 
			
		||||
      artifact: 'Ubuntu'
 | 
			
		||||
      path: $(Agent.TempDirectory)\package
 | 
			
		||||
  - task: DownloadPipelineArtifact@2
 | 
			
		||||
    displayName: 'Download macOS Build'
 | 
			
		||||
    inputs:
 | 
			
		||||
      artifact: 'Mac'
 | 
			
		||||
      path: $(Agent.TempDirectory)\package
 | 
			
		||||
  - task: PythonScript@0
 | 
			
		||||
    displayName: 'Python: assemble files'
 | 
			
		||||
    inputs:
 | 
			
		||||
      scriptSource: 'filepath'
 | 
			
		||||
      scriptPath: scripts\mk_nuget_task.py
 | 
			
		||||
      workingDirectory: $(Agent.TempDirectory)\package
 | 
			
		||||
      arguments:
 | 
			
		||||
        $(Agent.TempDirectory)\package
 | 
			
		||||
        $(ReleaseVersion)
 | 
			
		||||
        $(Build.Repository.Uri)
 | 
			
		||||
        $(Build.SourceBranchName)
 | 
			
		||||
        $(Build.SourceVersion)
 | 
			
		||||
        $(Build.SourcesDirectory)
 | 
			
		||||
  - task: NuGetToolInstaller@0
 | 
			
		||||
    inputs:
 | 
			
		||||
      versionSpec: 5.x
 | 
			
		||||
      checkLatest: false
 | 
			
		||||
  - task: NugetCommand@2
 | 
			
		||||
    displayName: 'NuGet Pack'
 | 
			
		||||
    inputs:
 | 
			
		||||
      command: pack
 | 
			
		||||
      packagesToPack: $(Agent.TempDirectory)\package\out\Microsoft.Z3.x64.nuspec
 | 
			
		||||
      basePath: $(Agent.TempDirectory)\package\out
 | 
			
		||||
      packDestination: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
      verbosityPack: detailed
 | 
			
		||||
  - task: NugetCommand@2
 | 
			
		||||
    displayName: 'NuGet Pack Symbols'
 | 
			
		||||
    inputs:
 | 
			
		||||
      command: pack
 | 
			
		||||
      packagesToPack: $(Agent.TempDirectory)\package\out\Microsoft.Z3.x64.nuspec
 | 
			
		||||
      basePath: $(Agent.TempDirectory)\package\out
 | 
			
		||||
      packDestination: $(Build.ArtifactStagingDirectory)
 | 
			
		||||
      verbosityPack: detailed
 | 
			
		||||
      includeSymbols: true
 | 
			
		||||
  - job: Python
 | 
			
		||||
    displayName: "Python packaging"
 | 
			
		||||
    dependsOn:
 | 
			
		||||
    - Manylinux
 | 
			
		||||
    - Windows32
 | 
			
		||||
    - Windows64
 | 
			
		||||
    - Mac
 | 
			
		||||
    pool:
 | 
			
		||||
      vmImage: "ubuntu-latest"
 | 
			
		||||
    steps:
 | 
			
		||||
    - task: DownloadPipelineArtifact@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifactName: 'Windows32'
 | 
			
		||||
        targetPath: $(Agent.TempDirectory)
 | 
			
		||||
    - task: DownloadPipelineArtifact@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifactName: 'Windows64'
 | 
			
		||||
        targetPath: $(Agent.TempDirectory)
 | 
			
		||||
    - task: DownloadPipelineArtifact@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifactName: 'Manylinux'
 | 
			
		||||
        targetPath: $(Agent.TempDirectory)
 | 
			
		||||
    - task: DownloadPipelineArtifact@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifactName: 'Mac'
 | 
			
		||||
        targetPath: $(Agent.TempDirectory)
 | 
			
		||||
    - script: cd $(Agent.TempDirectory); mkdir osx-bin; cd osx-bin; unzip ../*osx*.zip
 | 
			
		||||
    - script: cd $(Agent.TempDirectory); mkdir linux-bin; cd linux-bin; unzip ../*centos*.zip
 | 
			
		||||
    - script: cd $(Agent.TempDirectory); mkdir win32-bin; cd win32-bin; unzip ../*x86-win*.zip
 | 
			
		||||
    - script: cd $(Agent.TempDirectory); mkdir win64-bin; cd win64-bin; unzip ../*x64-win*.zip
 | 
			
		||||
    - script: python3 -m pip install --user -U setuptools wheel
 | 
			
		||||
    - script: cd src/api/python; python3 setup.py sdist
 | 
			
		||||
    # take a look at this PREMIUM HACK I came up with to get around the fact that the azure variable syntax overloads the bash syntax for subshells
 | 
			
		||||
    - script: cd src/api/python; echo $(Agent.TempDirectory)/linux-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
 | 
			
		||||
    - script: cd src/api/python; echo $(Agent.TempDirectory)/win32-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
 | 
			
		||||
    - script: cd src/api/python; echo $(Agent.TempDirectory)/win64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
 | 
			
		||||
    - script: cd src/api/python; echo $(Agent.TempDirectory)/osx-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
 | 
			
		||||
    - task: PublishPipelineArtifact@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifactName: 'Python packages'
 | 
			
		||||
        targetPath: src/api/python/dist
 | 
			
		||||
 | 
			
		||||
- job: Python
 | 
			
		||||
  displayName: "Python packaging"
 | 
			
		||||
  dependsOn:
 | 
			
		||||
  - Manylinux
 | 
			
		||||
  - Windows32
 | 
			
		||||
  - Windows64
 | 
			
		||||
  - Mac
 | 
			
		||||
  pool:
 | 
			
		||||
    vmImage: "ubuntu-latest"
 | 
			
		||||
  steps:
 | 
			
		||||
  - task: DownloadPipelineArtifact@0
 | 
			
		||||
    inputs:
 | 
			
		||||
     artifactName: 'Windows32'
 | 
			
		||||
     targetPath: $(Agent.TempDirectory)
 | 
			
		||||
  - task: DownloadPipelineArtifact@0
 | 
			
		||||
    inputs:
 | 
			
		||||
     artifactName: 'Windows64'
 | 
			
		||||
     targetPath: $(Agent.TempDirectory)
 | 
			
		||||
  - task: DownloadPipelineArtifact@0
 | 
			
		||||
    inputs:
 | 
			
		||||
     artifactName: 'Manylinux'
 | 
			
		||||
     targetPath: $(Agent.TempDirectory)
 | 
			
		||||
  - task: DownloadPipelineArtifact@0
 | 
			
		||||
    inputs:
 | 
			
		||||
     artifactName: 'Mac'
 | 
			
		||||
     targetPath: $(Agent.TempDirectory)
 | 
			
		||||
  - script: cd $(Agent.TempDirectory); mkdir osx-bin; cd osx-bin; unzip ../*osx*.zip
 | 
			
		||||
  - script: cd $(Agent.TempDirectory); mkdir linux-bin; cd linux-bin; unzip ../*centos*.zip
 | 
			
		||||
  - script: cd $(Agent.TempDirectory); mkdir win32-bin; cd win32-bin; unzip ../*x86-win*.zip
 | 
			
		||||
  - script: cd $(Agent.TempDirectory); mkdir win64-bin; cd win64-bin; unzip ../*x64-win*.zip
 | 
			
		||||
  - script: python3 -m pip install --user -U setuptools wheel
 | 
			
		||||
  - script: cd src/api/python; python3 setup.py sdist
 | 
			
		||||
  # take a look at this PREMIUM HACK I came up with to get around the fact that the azure variable syntax overloads the bash syntax for subshells
 | 
			
		||||
  - script: cd src/api/python; echo $(Agent.TempDirectory)/linux-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
 | 
			
		||||
  - script: cd src/api/python; echo $(Agent.TempDirectory)/win32-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
 | 
			
		||||
  - script: cd src/api/python; echo $(Agent.TempDirectory)/win64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
 | 
			
		||||
  - script: cd src/api/python; echo $(Agent.TempDirectory)/osx-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
 | 
			
		||||
  - task: PublishPipelineArtifact@0
 | 
			
		||||
    inputs:
 | 
			
		||||
      artifactName: 'Python packages'
 | 
			
		||||
      targetPath: src/api/python/dist
 | 
			
		||||
 | 
			
		||||
- job: Deploy
 | 
			
		||||
  displayName: "Deploy into GitHub"
 | 
			
		||||
  dependsOn: 
 | 
			
		||||
  - Mac
 | 
			
		||||
  - Ubuntu
 | 
			
		||||
  - Windows32
 | 
			
		||||
  - Windows64
 | 
			
		||||
  - Python
 | 
			
		||||
  - NuGet
 | 
			
		||||
  steps:
 | 
			
		||||
  - task: DownloadPipelineArtifact@0
 | 
			
		||||
    inputs:
 | 
			
		||||
     artifactName: 'Windows32'
 | 
			
		||||
     targetPath: tmp
 | 
			
		||||
  - task: DownloadPipelineArtifact@0
 | 
			
		||||
    inputs:
 | 
			
		||||
     artifactName: 'Windows64'
 | 
			
		||||
     targetPath: tmp
 | 
			
		||||
  - task: DownloadPipelineArtifact@0
 | 
			
		||||
    inputs:
 | 
			
		||||
     artifactName: 'Mac'
 | 
			
		||||
     targetPath: tmp
 | 
			
		||||
  - task: DownloadPipelineArtifact@0
 | 
			
		||||
    inputs:
 | 
			
		||||
     artifactName: 'Ubuntu'
 | 
			
		||||
     targetPath: tmp
 | 
			
		||||
  - task: DownloadPipelineArtifact@0
 | 
			
		||||
    inputs:
 | 
			
		||||
     artifactName: 'Python packages'
 | 
			
		||||
     targetPath: tmp
 | 
			
		||||
  - task: DownloadPipelineArtifact@0
 | 
			
		||||
    inputs:
 | 
			
		||||
     artifactName: 'NuGet'
 | 
			
		||||
     targetPath: tmp
 | 
			
		||||
  - task: GitHubRelease@0
 | 
			
		||||
    inputs:
 | 
			
		||||
      gitHubConnection: Z3GitHub
 | 
			
		||||
      repositoryName: 'Z3Prover/z3'
 | 
			
		||||
      action: 'delete'
 | 
			
		||||
- stage: Deployment
 | 
			
		||||
  - job: Deploy
 | 
			
		||||
    displayName: "Deploy into GitHub"
 | 
			
		||||
    dependsOn: 
 | 
			
		||||
    - Mac
 | 
			
		||||
    - Ubuntu
 | 
			
		||||
    - Windows32
 | 
			
		||||
    - Windows64
 | 
			
		||||
    - Python
 | 
			
		||||
    - NuGet
 | 
			
		||||
    steps:
 | 
			
		||||
    - task: DownloadPipelineArtifact@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifactName: 'Windows32'
 | 
			
		||||
        targetPath: tmp
 | 
			
		||||
    - task: DownloadPipelineArtifact@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifactName: 'Windows64'
 | 
			
		||||
        targetPath: tmp
 | 
			
		||||
    - task: DownloadPipelineArtifact@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifactName: 'Mac'
 | 
			
		||||
        targetPath: tmp
 | 
			
		||||
    - task: DownloadPipelineArtifact@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifactName: 'Ubuntu'
 | 
			
		||||
        targetPath: tmp
 | 
			
		||||
    - task: DownloadPipelineArtifact@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifactName: 'Python packages'
 | 
			
		||||
        targetPath: tmp
 | 
			
		||||
    - task: DownloadPipelineArtifact@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        artifactName: 'NuGet'
 | 
			
		||||
        targetPath: tmp
 | 
			
		||||
    - task: GitHubRelease@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        gitHubConnection: Z3GitHub
 | 
			
		||||
        repositoryName: 'Z3Prover/z3'
 | 
			
		||||
        action: 'delete'
 | 
			
		||||
#     target: '$(Build.SourceVersion)'
 | 
			
		||||
      tagSource: 'manual'
 | 
			
		||||
      tag: 'Nightly'
 | 
			
		||||
  - task: GitHubRelease@0
 | 
			
		||||
    inputs:
 | 
			
		||||
      gitHubConnection: Z3GitHub
 | 
			
		||||
      repositoryName: 'Z3Prover/z3'
 | 
			
		||||
      action: 'create'
 | 
			
		||||
        tagSource: 'manual'
 | 
			
		||||
        tag: 'Nightly'
 | 
			
		||||
    - task: GitHubRelease@0
 | 
			
		||||
      inputs:
 | 
			
		||||
        gitHubConnection: Z3GitHub
 | 
			
		||||
        repositoryName: 'Z3Prover/z3'
 | 
			
		||||
        action: 'create'
 | 
			
		||||
#     target: '$(Build.SourceVersion)'
 | 
			
		||||
      tagSource: 'manual'
 | 
			
		||||
      tag: 'Nightly'
 | 
			
		||||
      title: 'Nightly'
 | 
			
		||||
      releaseNotesSource: 'input'
 | 
			
		||||
      releaseNotes: 'nightly build'
 | 
			
		||||
      assets: 'tmp/*'
 | 
			
		||||
      assetUploadMode: 'replace'
 | 
			
		||||
      isDraft: false
 | 
			
		||||
      isPreRelease: true
 | 
			
		||||
        tagSource: 'manual'
 | 
			
		||||
        tag: 'Nightly'
 | 
			
		||||
        title: 'Nightly'
 | 
			
		||||
        releaseNotesSource: 'input'
 | 
			
		||||
        releaseNotes: 'nightly build'
 | 
			
		||||
        assets: 'tmp/*'
 | 
			
		||||
        assetUploadMode: 'replace'
 | 
			
		||||
        isDraft: false
 | 
			
		||||
        isPreRelease: true
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# TBD: run regression tests on generated binaries.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue