3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-09-02 00:00:41 +00:00

Add python packaging build and deployment with Azure

This commit is contained in:
Audrey Dutcher 2019-08-13 19:17:13 -07:00 committed by Nikolaj Bjorner
parent eec550e645
commit ec5b148ecc
4 changed files with 120 additions and 14 deletions

View file

@ -17,7 +17,6 @@ jobs:
artifactName: 'Mac'
targetPath: $(Build.ArtifactStagingDirectory)
- job: Ubuntu
displayName: "Ubuntu build"
pool:
@ -35,6 +34,23 @@ jobs:
artifactName: 'Ubuntu'
targetPath: $(Build.ArtifactStagingDirectory)
- job: Manylinux
displayName: "Manylinux build"
pool:
vmImage: "ubuntu-16.04"
container: "rhelmot/manylinux1_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: Windows
displayName: "Windows build"
pool:
@ -52,6 +68,36 @@ jobs:
artifactName: 'Windows'
targetPath: $(Build.ArtifactStagingDirectory)
- job: Python
displayName: "Python packaging"
dependsOn:
- Manylinux
- Windows
pool:
vmImage: "ubuntu-16.04"
steps:
- task: DownloadPipelineArtifact@0
inputs:
artifactName: 'Windows'
targetPath: $(Agent.TempDirectory)
- task: DownloadPipelineArtifact@0
inputs:
artifactName: 'Manylinux'
targetPath: $(Agent.TempDirectory)
- 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: python -m pip install --user -U setuptools wheel
- script: cd src/api/python; python 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 '{}' python setup.py bdist_wheel
- script: cd src/api/python; echo $(Agent.TempDirectory)/win32-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python setup.py bdist_wheel
- script: cd src/api/python; echo $(Agent.TempDirectory)/win64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python setup.py bdist_wheel
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'Python packages'
targetPath: src/api/python/dist
- job: Deploy
displayName: "Deploy into GitHub"
dependsOn: