@@ -10,14 +10,13 @@ jobs:
10
10
secureFile : ' z3.snk'
11
11
- script : python scripts/mk_unix_dist.py --dotnet-key=$(Agent.TempDirectory)/z3.snk
12
12
- script : git clone https://github.com/z3prover/z3test z3test
13
- - script : python z3test/scripts/test_benchmarks.py build-dist/z3 z3test/regressions/smt2
13
+ - script : python z3test/scripts/test_benchmarks.py build-dist/z3 z3test/regressions/smt2
14
14
- script : cp dist/*.zip $(Build.ArtifactStagingDirectory)/.
15
15
- task : PublishPipelineArtifact@0
16
16
inputs :
17
17
artifactName : ' Mac'
18
18
targetPath : $(Build.ArtifactStagingDirectory)
19
19
20
-
21
20
- job : Ubuntu
22
21
displayName : " Ubuntu build"
23
22
pool :
@@ -28,13 +27,30 @@ jobs:
28
27
secureFile : ' z3.snk'
29
28
- script : python scripts/mk_unix_dist.py --dotnet-key=$(Agent.TempDirectory)/z3.snk
30
29
- script : git clone https://github.com/z3prover/z3test z3test
31
- - script : python z3test/scripts/test_benchmarks.py build-dist/z3 z3test/regressions/smt2
30
+ - script : python z3test/scripts/test_benchmarks.py build-dist/z3 z3test/regressions/smt2
32
31
- script : cp dist/*.zip $(Build.ArtifactStagingDirectory)/.
33
32
- task : PublishPipelineArtifact@0
34
33
inputs :
35
34
artifactName : ' Ubuntu'
36
35
targetPath : $(Build.ArtifactStagingDirectory)
37
36
37
+ - job : Manylinux
38
+ displayName : " Manylinux build"
39
+ pool :
40
+ vmImage : " ubuntu-16.04"
41
+ container : " rhelmot/manylinux1_x86_64:latest"
42
+ variables :
43
+ python : " /opt/python/cp35-cp35m/bin/python"
44
+ steps :
45
+ - script : $(python) scripts/mk_unix_dist.py --nodotnet --nojava
46
+ - script : git clone https://github.com/z3prover/z3test z3test
47
+ - script : $(python) z3test/scripts/test_benchmarks.py build-dist/z3 z3test/regressions/smt2
48
+ - script : cp dist/*.zip $(Build.ArtifactStagingDirectory)/
49
+ - task : PublishPipelineArtifact@0
50
+ inputs :
51
+ artifactName : ' Manylinux'
52
+ targetPath : $(Build.ArtifactStagingDirectory)
53
+
38
54
- job : Windows
39
55
displayName : " Windows build"
40
56
pool :
@@ -43,19 +59,50 @@ jobs:
43
59
- task : DownloadSecureFile@1
44
60
inputs :
45
61
secureFile : ' z3.snk'
46
- - script : scripts\mk_win_dist.cmd
62
+ - script : scripts\mk_win_dist.cmd
47
63
- script : xcopy dist\*.zip $(Build.ArtifactStagingDirectory)\* /y
48
64
- task : PublishPipelineArtifact@0
49
65
inputs :
50
66
artifactName : ' Windows'
51
67
targetPath : $(Build.ArtifactStagingDirectory)
52
68
69
+ - job : Python
70
+ displayName : " Python packaging"
71
+ dependsOn :
72
+ - Manylinux
73
+ - Windows
74
+ pool :
75
+ vmImage : " ubuntu-16.04"
76
+ steps :
77
+ - task : DownloadPipelineArtifact@0
78
+ inputs :
79
+ artifactName : ' Windows'
80
+ targetPath : $(Agent.TempDirectory)
81
+ - task : DownloadPipelineArtifact@0
82
+ inputs :
83
+ artifactName : ' Manylinux'
84
+ targetPath : $(Agent.TempDirectory)
85
+ - script : cd $(Agent.TempDirectory); mkdir linux-bin; cd linux-bin; unzip ../*centos*.zip
86
+ - script : cd $(Agent.TempDirectory); mkdir win32-bin; cd win32-bin; unzip ../*x86-win*.zip
87
+ - script : cd $(Agent.TempDirectory); mkdir win64-bin; cd win64-bin; unzip ../*x64-win*.zip
88
+ - script : python -m pip install --user -U setuptools wheel
89
+ - script : cd src/api/python; python setup.py sdist
90
+ # 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
91
+ - 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
92
+ - 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
93
+ - 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
94
+ - task : PublishPipelineArtifact@0
95
+ inputs :
96
+ artifactName : ' Python packages'
97
+ targetPath : src/api/python/dist
98
+
53
99
- job : Deploy
54
- displayName : " Deploy into GitHub"
55
- dependsOn :
100
+ displayName : " Deploy into GitHub and PyPI "
101
+ dependsOn :
56
102
- Mac
57
103
- Ubuntu
58
104
- Windows
105
+ - Python
59
106
steps :
60
107
- task : DownloadPipelineArtifact@0
61
108
inputs :
@@ -69,10 +116,6 @@ jobs:
69
116
inputs :
70
117
artifactName : ' Ubuntu'
71
118
targetPath : tmp
72
- - task : CopyFiles@2
73
- inputs :
74
- sourceFolder : $(Build.ArtifactStagingDirectory)
75
- targetFolder : tmp
76
119
# TBD: build NuGet package
77
120
# TBD: this script should build a specific pre-specified tag
78
121
- task : GitHubRelease@0
@@ -89,6 +132,16 @@ jobs:
89
132
assets : ' tmp/*'
90
133
isDraft : true
91
134
isPreRelease : true
135
+ - task : DownloadPipelineArtifact@0
136
+ inputs :
137
+ artifactName : ' Python packages'
138
+ targetPath : dist
139
+ - task : DownloadSecureFile@1
140
+ name : pypirc
141
+ inputs :
142
+ secureFile : ' pypirc'
143
+ - script : python -m pip install --user -U setuptools wheel twine
144
+ - script : python -m twine upload --config-file $(pypirc.secureFilePath) -r $(pypiReleaseServer) dist/*
92
145
93
146
94
147
# TBD: run regression tests on generated binaries.
0 commit comments