| 1 |
variables: |
| 2 |
Major: '4' |
| 3 |
Minor: '13' |
| 4 |
Patch: '3' |
| 5 |
ReleaseVersion: $(Major).$(Minor).$(Patch) |
| 6 |
AssemblyVersion: $(Major).$(Minor).$(Patch).$(Build.BuildId) |
| 7 |
NightlyVersion: $(AssemblyVersion)-$(Build.buildId) |
| 8 |
|
| 9 |
stages: |
| 10 |
- stage: Build |
| 11 |
jobs: |
| 12 |
- job: MacBuild |
| 13 |
displayName: "Mac Build" |
| 14 |
pool: |
| 15 |
vmImage: "macOS-13" |
| 16 |
steps: |
| 17 |
- task: PythonScript@0 |
| 18 |
displayName: Build |
| 19 |
inputs: |
| 20 |
scriptSource: 'filepath' |
| 21 |
scriptPath: scripts/mk_unix_dist.py |
| 22 |
arguments: --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk |
| 23 |
- script: git clone https://github.com/z3prover/z3test z3test |
| 24 |
displayName: 'Clone z3test' |
| 25 |
- task: PythonScript@0 |
| 26 |
displayName: Test |
| 27 |
inputs: |
| 28 |
scriptSource: 'filepath' |
| 29 |
scriptPath: z3test/scripts/test_benchmarks.py |
| 30 |
arguments: build-dist/z3 z3test/regressions/smt2 |
| 31 |
- task: CopyFiles@2 |
| 32 |
inputs: |
| 33 |
sourceFolder: dist |
| 34 |
contents: '*.zip' |
| 35 |
targetFolder: $(Build.ArtifactStagingDirectory) |
| 36 |
- task: PublishPipelineArtifact@0 |
| 37 |
inputs: |
| 38 |
artifactName: 'macOsBuild' |
| 39 |
targetPath: $(Build.ArtifactStagingDirectory) |
| 40 |
|
| 41 |
- job: MacBuildArm64 |
| 42 |
displayName: "Mac ARM64 Build" |
| 43 |
pool: |
| 44 |
vmImage: "macOS-13" |
| 45 |
steps: |
| 46 |
- script: python scripts/mk_unix_dist.py --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk --arch=arm64 |
| 47 |
- script: git clone https://github.com/z3prover/z3test z3test |
| 48 |
- script: cp dist/*.zip $(Build.ArtifactStagingDirectory)/. |
| 49 |
- task: PublishPipelineArtifact@1 |
| 50 |
inputs: |
| 51 |
artifactName: 'MacArm64' |
| 52 |
targetPath: $(Build.ArtifactStagingDirectory) |
| 53 |
|
| 54 |
- job: UbuntuBuild |
| 55 |
displayName: "Ubuntu build" |
| 56 |
pool: |
| 57 |
vmImage: "ubuntu-latest" |
| 58 |
steps: |
| 59 |
- task: PythonScript@0 |
| 60 |
displayName: Build |
| 61 |
inputs: |
| 62 |
scriptSource: 'filepath' |
| 63 |
scriptPath: scripts/mk_unix_dist.py |
| 64 |
arguments: --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk |
| 65 |
- script: git clone https://github.com/z3prover/z3test z3test |
| 66 |
displayName: 'Clone z3test' |
| 67 |
- task: PythonScript@0 |
| 68 |
displayName: Test |
| 69 |
inputs: |
| 70 |
scriptSource: 'filepath' |
| 71 |
scriptPath: z3test/scripts/test_benchmarks.py |
| 72 |
arguments: build-dist/z3 z3test/regressions/smt2 |
| 73 |
- task: CopyFiles@2 |
| 74 |
inputs: |
| 75 |
sourceFolder: dist |
| 76 |
contents: '*.zip' |
| 77 |
targetFolder: $(Build.ArtifactStagingDirectory) |
| 78 |
- task: PublishPipelineArtifact@0 |
| 79 |
inputs: |
| 80 |
artifactName: 'UbuntuBuild' |
| 81 |
targetPath: $(Build.ArtifactStagingDirectory) |
| 82 |
|
| 83 |
- job: UbuntuArm64 |
| 84 |
displayName: "Ubuntu ARM64 build" |
| 85 |
pool: |
| 86 |
vmImage: "ubuntu-latest" |
| 87 |
steps: |
| 88 |
- script: curl -L -o /tmp/arm-toolchain.tar.xz 'https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu.tar.xz?rev=33c6e30e5ac64e6dba8f0431f2c35f1b&hash=9918A05BF47621B632C7A5C8D2BB438FB80A4480' |
| 89 |
- script: mkdir -p /tmp/arm-toolchain/ |
| 90 |
- script: tar xf /tmp/arm-toolchain.tar.xz -C /tmp/arm-toolchain/ --strip-components=1 |
| 91 |
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/bin' |
| 92 |
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/aarch64-none-linux-gnu/libc/usr/bin' |
| 93 |
- script: echo $PATH |
| 94 |
- script: stat /tmp/arm-toolchain/bin/aarch64-none-linux-gnu-gcc |
| 95 |
- script: python scripts/mk_unix_dist.py --nodotnet --arch=arm64 |
| 96 |
- task: CopyFiles@2 |
| 97 |
inputs: |
| 98 |
sourceFolder: dist |
| 99 |
contents: '*.zip' |
| 100 |
targetFolder: $(Build.ArtifactStagingDirectory) |
| 101 |
- task: PublishPipelineArtifact@0 |
| 102 |
inputs: |
| 103 |
artifactName: 'UbuntuArm64' |
| 104 |
targetPath: $(Build.ArtifactStagingDirectory) |
| 105 |
|
| 106 |
- job: UbuntuDoc |
| 107 |
displayName: "Ubuntu Doc build" |
| 108 |
pool: |
| 109 |
vmImage: "ubuntu-latest" |
| 110 |
steps: |
| 111 |
- script: pip3 install importlib-resources |
| 112 |
- script: sudo apt-get install ocaml opam libgmp-dev |
| 113 |
- script: opam init -y |
| 114 |
- script: eval `opam config env`; opam install zarith ocamlfind -y |
| 115 |
- script: eval `opam config env`; python scripts/mk_make.py --ml |
| 116 |
- script: sudo apt-get install doxygen |
| 117 |
- script: sudo apt-get install graphviz |
| 118 |
- script: | |
| 119 |
set -e |
| 120 |
cd build |
| 121 |
eval `opam config env` |
| 122 |
make -j3 |
| 123 |
make -j3 examples |
| 124 |
make -j3 test-z3 |
| 125 |
cd .. |
| 126 |
- script: | |
| 127 |
set -e |
| 128 |
eval `opam config env` |
| 129 |
cd doc |
| 130 |
python3 mk_api_doc.py --mld --z3py-package-path=../build/python/z3 |
| 131 |
python3 mk_params_doc.py |
| 132 |
mkdir api/html/ml |
| 133 |
ocamldoc -html -d api/html/ml -sort -hide Z3 -I $( ocamlfind query zarith ) -I ../build/api/ml ../build/api/ml/z3enums.mli ../build/api/ml/z3.mli |
| 134 |
cd .. |
| 135 |
- script: zip -r z3doc.zip doc/api |
| 136 |
- script: cp z3doc.zip $(Build.ArtifactStagingDirectory)/. |
| 137 |
- task: PublishPipelineArtifact@0 |
| 138 |
inputs: |
| 139 |
artifactName: 'UbuntuDoc' |
| 140 |
targetPath: $(Build.ArtifactStagingDirectory) |
| 141 |
# TODO copy artifacts |
| 142 |
|
| 143 |
- job: "ManylinuxPythonBuildAmd64" |
| 144 |
displayName: "Python bindings (manylinux Centos AMD64) build" |
| 145 |
pool: |
| 146 |
vmImage: "ubuntu-latest" |
| 147 |
container: "quay.io/pypa/manylinux2014_x86_64:latest" |
| 148 |
steps: |
| 149 |
- script: "/opt/python/cp38-cp38/bin/python -m venv $PWD/env" |
| 150 |
- script: 'echo "##vso[task.prependpath]$PWD/env/bin"' |
| 151 |
- script: "pip install build git+https://github.com/rhelmot/auditwheel" # @TODO remove when patches make it upstream |
| 152 |
- script: "cd src/api/python && python -m build && AUDITWHEEL_PLAT= auditwheel repair --best-plat dist/*.whl && cd ../../.." |
| 153 |
- script: "pip install ./src/api/python/wheelhouse/*.whl && python - <src/api/python/z3test.py z3 && python - <src/api/python/z3test.py z3num" |
| 154 |
- task: CopyFiles@2 |
| 155 |
inputs: |
| 156 |
sourceFolder: src/api/python/wheelhouse |
| 157 |
contents: '*.whl' |
| 158 |
targetFolder: $(Build.ArtifactStagingDirectory) |
| 159 |
- task: PublishPipelineArtifact@0 |
| 160 |
inputs: |
| 161 |
artifactName: 'ManyLinuxPythonBuildAMD64' |
| 162 |
targetPath: $(Build.ArtifactStagingDirectory) |
| 163 |
|
| 164 |
- job: ManyLinuxPythonBuildArm64 |
| 165 |
displayName: "Python bindings (manylinux Centos ARM64 cross) build" |
| 166 |
variables: |
| 167 |
name: ManyLinux |
| 168 |
python: "/opt/python/cp37-cp37m/bin/python" |
| 169 |
pool: |
| 170 |
vmImage: "ubuntu-latest" |
| 171 |
container: "quay.io/pypa/manylinux2014_x86_64:latest" |
| 172 |
steps: |
| 173 |
- script: curl -L -o /tmp/arm-toolchain.tar.xz 'https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu.tar.xz?rev=33c6e30e5ac64e6dba8f0431f2c35f1b&hash=9918A05BF47621B632C7A5C8D2BB438FB80A4480' |
| 174 |
- script: mkdir -p /tmp/arm-toolchain/ |
| 175 |
- script: tar xf /tmp/arm-toolchain.tar.xz -C /tmp/arm-toolchain/ --strip-components=1 |
| 176 |
- script: "/opt/python/cp38-cp38/bin/python -m venv $PWD/env" |
| 177 |
- script: 'echo "##vso[task.prependpath]$PWD/env/bin"' |
| 178 |
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/bin' |
| 179 |
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/aarch64-none-linux-gnu/libc/usr/bin' |
| 180 |
- script: echo $PATH |
| 181 |
- script: "stat `which aarch64-none-linux-gnu-gcc`" |
| 182 |
- script: "pip install build git+https://github.com/rhelmot/auditwheel" |
| 183 |
- script: "cd src/api/python && CC=aarch64-none-linux-gnu-gcc CXX=aarch64-none-linux-gnu-g++ AR=aarch64-none-linux-gnu-ar LD=aarch64-none-linux-gnu-ld Z3_CROSS_COMPILING=aarch64 python -m build && AUDITWHEEL_PLAT= auditwheel repair --best-plat dist/*.whl && cd ../../.." |
| 184 |
- task: CopyFiles@2 |
| 185 |
inputs: |
| 186 |
sourceFolder: src/api/python/wheelhouse |
| 187 |
contents: '*.whl' |
| 188 |
targetFolder: $(Build.ArtifactStagingDirectory) |
| 189 |
- task: PublishPipelineArtifact@0 |
| 190 |
inputs: |
| 191 |
artifactName: 'ManyLinuxPythonBuildArm64' |
| 192 |
targetPath: $(Build.ArtifactStagingDirectory) |
| 193 |
|
| 194 |
|
| 195 |
- template: build-win-signed.yml |
| 196 |
parameters: |
| 197 |
ReleaseVersion: $(ReleaseVersion) |
| 198 |
BuildArchitecture: 'x64' |
| 199 |
|
| 200 |
- template: build-win-signed.yml |
| 201 |
parameters: |
| 202 |
ReleaseVersion: $(ReleaseVersion) |
| 203 |
BuildArchitecture: 'x86' |
| 204 |
|
| 205 |
- template: build-win-signed-cmake.yml |
| 206 |
parameters: |
| 207 |
ReleaseVersion: $(ReleaseVersion) |
| 208 |
BuildArchitecture: 'arm64' |
| 209 |
VCArchitecture: 'amd64_arm64' |
| 210 |
|
| 211 |
- stage: Package |
| 212 |
jobs: |
| 213 |
- job: NuGet64 |
| 214 |
displayName: "NuGet 64 packaging" |
| 215 |
pool: |
| 216 |
vmImage: "windows-latest" |
| 217 |
steps: |
| 218 |
- powershell: write-host $(System.DefinitionId) |
| 219 |
displayName: 'System.DefinitionId' |
| 220 |
- powershell: write-host $(Build.BuildId) |
| 221 |
displayName: 'Build.BuildId' |
| 222 |
- powershell: write-host $(System.TeamProjectId) |
| 223 |
displayName: 'System.TeamProjectId' |
| 224 |
- task: DownloadPipelineArtifact@2 |
| 225 |
displayName: 'Download Win64 Build' |
| 226 |
inputs: |
| 227 |
artifact: 'WindowsBuild-x64' |
| 228 |
path: $(Agent.TempDirectory)\package |
| 229 |
- task: DownloadPipelineArtifact@2 |
| 230 |
displayName: 'Download Ubuntu Build' |
| 231 |
inputs: |
| 232 |
artifact: 'UbuntuBuild' |
| 233 |
path: $(Agent.TempDirectory)\package |
| 234 |
- task: DownloadPipelineArtifact@2 |
| 235 |
displayName: 'Download Ubuntu ARM64 Build' |
| 236 |
inputs: |
| 237 |
artifact: 'UbuntuArm64' |
| 238 |
path: $(Agent.TempDirectory)\package |
| 239 |
- task: DownloadPipelineArtifact@2 |
| 240 |
displayName: 'Download macOS Build' |
| 241 |
inputs: |
| 242 |
artifact: 'macOsBuild' |
| 243 |
path: $(Agent.TempDirectory)\package |
| 244 |
- task: DownloadPipelineArtifact@2 |
| 245 |
displayName: 'Download macOS Arm64 Build' |
| 246 |
inputs: |
| 247 |
artifact: 'MacArm64' |
| 248 |
path: $(Agent.TempDirectory)\package |
| 249 |
- task: NuGetToolInstaller@0 |
| 250 |
inputs: |
| 251 |
versionSpec: 5.x |
| 252 |
checkLatest: false |
| 253 |
- task: PythonScript@0 |
| 254 |
displayName: 'Python: assemble files' |
| 255 |
inputs: |
| 256 |
scriptSource: 'filepath' |
| 257 |
scriptPath: scripts\mk_nuget_task.py |
| 258 |
workingDirectory: $(Agent.TempDirectory)\package |
| 259 |
arguments: |
| 260 |
$(Agent.TempDirectory)\package |
| 261 |
$(NightlyVersion) |
| 262 |
$(Build.Repository.Uri) |
| 263 |
$(Build.SourceBranchName) |
| 264 |
$(Build.SourceVersion) |
| 265 |
$(Build.SourcesDirectory) |
| 266 |
symbols |
| 267 |
- task: NugetCommand@2 |
| 268 |
displayName: 'NuGet Pack Symbols' |
| 269 |
inputs: |
| 270 |
command: custom |
| 271 |
versioningScheme: byPrereleaseNumber |
| 272 |
majorVersion: $(Major) |
| 273 |
minorVersion: $(Minor) |
| 274 |
patchVersion: $(Patch) |
| 275 |
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' |
| 276 |
- task: EsrpCodeSigning@2 |
| 277 |
condition: eq(1,0) |
| 278 |
continueOnError: true |
| 279 |
displayName: 'Sign Package' |
| 280 |
inputs: |
| 281 |
ConnectedServiceName: 'z3-esrp-signing-2' |
| 282 |
FolderPath: $(Build.ArtifactStagingDirectory) |
| 283 |
Pattern: Microsoft.Z3.$(NightlyVersion).nupkg |
| 284 |
signConfigType: 'inlineSignParams' |
| 285 |
inlineOperation: | |
| 286 |
[ |
| 287 |
{ |
| 288 |
"KeyCode" : "CP-401405", |
| 289 |
"OperationCode" : "NuGetSign", |
| 290 |
"Parameters" : {}, |
| 291 |
"ToolName" : "sign", |
| 292 |
"ToolVersion" : "1.0" |
| 293 |
}, |
| 294 |
{ |
| 295 |
"KeyCode" : "CP-401405", |
| 296 |
"OperationCode" : "NuGetVerify", |
| 297 |
"Parameters" : {}, |
| 298 |
"ToolName" : "sign", |
| 299 |
"ToolVersion" : "1.0" |
| 300 |
} |
| 301 |
] |
| 302 |
SessionTimeout: '60' |
| 303 |
MaxConcurrency: '50' |
| 304 |
MaxRetryAttempts: '5' |
| 305 |
- task: EsrpCodeSigning@2 |
| 306 |
continueOnError: true |
| 307 |
condition: eq(1,0) |
| 308 |
displayName: 'Sign Symbol Package' |
| 309 |
inputs: |
| 310 |
ConnectedServiceName: 'z3-esrp-signing-2' |
| 311 |
FolderPath: $(Build.ArtifactStagingDirectory) |
| 312 |
Pattern: Microsoft.Z3.$(NightlyVersion).snupkg |
| 313 |
signConfigType: 'inlineSignParams' |
| 314 |
inlineOperation: | |
| 315 |
[ |
| 316 |
{ |
| 317 |
"KeyCode" : "CP-401405", |
| 318 |
"OperationCode" : "NuGetSign", |
| 319 |
"Parameters" : {}, |
| 320 |
"ToolName" : "sign", |
| 321 |
"ToolVersion" : "1.0" |
| 322 |
}, |
| 323 |
{ |
| 324 |
"KeyCode" : "CP-401405", |
| 325 |
"OperationCode" : "NuGetVerify", |
| 326 |
"Parameters" : {}, |
| 327 |
"ToolName" : "sign", |
| 328 |
"ToolVersion" : "1.0" |
| 329 |
} |
| 330 |
] |
| 331 |
SessionTimeout: '60' |
| 332 |
MaxConcurrency: '50' |
| 333 |
MaxRetryAttempts: '5' |
| 334 |
- task: PublishPipelineArtifact@1 |
| 335 |
inputs: |
| 336 |
targetPath: $(Build.ArtifactStagingDirectory) |
| 337 |
artifactName: 'NuGet' |
| 338 |
|
| 339 |
- job: NuGet32 |
| 340 |
displayName: "NuGet 32 packaging" |
| 341 |
pool: |
| 342 |
vmImage: "windows-latest" |
| 343 |
steps: |
| 344 |
- powershell: write-host $(System.DefinitionId) |
| 345 |
displayName: 'System.DefinitionId' |
| 346 |
- powershell: write-host $(Build.BuildId) |
| 347 |
displayName: 'Build.BuildId' |
| 348 |
- powershell: write-host $(System.TeamProjectId) |
| 349 |
displayName: 'System.TeamProjectId' |
| 350 |
- task: DownloadPipelineArtifact@2 |
| 351 |
displayName: 'Download Win32 Build' |
| 352 |
inputs: |
| 353 |
artifact: 'WindowsBuild-x86' |
| 354 |
path: $(Agent.TempDirectory)\package |
| 355 |
- task: NuGetToolInstaller@0 |
| 356 |
inputs: |
| 357 |
versionSpec: 5.x |
| 358 |
checkLatest: false |
| 359 |
- task: PythonScript@0 |
| 360 |
displayName: 'Python: assemble files' |
| 361 |
inputs: |
| 362 |
scriptSource: 'filepath' |
| 363 |
scriptPath: scripts\mk_nuget_task.py |
| 364 |
workingDirectory: $(Agent.TempDirectory)\package |
| 365 |
arguments: |
| 366 |
$(Agent.TempDirectory)\package |
| 367 |
$(NightlyVersion) |
| 368 |
$(Build.Repository.Uri) |
| 369 |
$(Build.SourceBranchName) |
| 370 |
$(Build.SourceVersion) |
| 371 |
$(Build.SourcesDirectory) |
| 372 |
symbols |
| 373 |
x86 |
| 374 |
- task: NugetCommand@2 |
| 375 |
displayName: 'NuGet Pack Symbols' |
| 376 |
inputs: |
| 377 |
command: custom |
| 378 |
versioningScheme: byPrereleaseNumber |
| 379 |
majorVersion: $(Major) |
| 380 |
minorVersion: $(Minor) |
| 381 |
patchVersion: $(Patch) |
| 382 |
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' |
| 383 |
- task: EsrpCodeSigning@2 |
| 384 |
condition: eq(1,0) |
| 385 |
continueOnError: true |
| 386 |
displayName: 'Sign Package' |
| 387 |
inputs: |
| 388 |
ConnectedServiceName: 'z3-esrp-signing-2' |
| 389 |
FolderPath: $(Build.ArtifactStagingDirectory) |
| 390 |
Pattern: Microsoft.Z3.x86.$(NightlyVersion).nupkg |
| 391 |
signConfigType: 'inlineSignParams' |
| 392 |
inlineOperation: | |
| 393 |
[ |
| 394 |
{ |
| 395 |
"KeyCode" : "CP-401405", |
| 396 |
"OperationCode" : "NuGetSign", |
| 397 |
"Parameters" : {}, |
| 398 |
"ToolName" : "sign", |
| 399 |
"ToolVersion" : "1.0" |
| 400 |
}, |
| 401 |
{ |
| 402 |
"KeyCode" : "CP-401405", |
| 403 |
"OperationCode" : "NuGetVerify", |
| 404 |
"Parameters" : {}, |
| 405 |
"ToolName" : "sign", |
| 406 |
"ToolVersion" : "1.0" |
| 407 |
} |
| 408 |
] |
| 409 |
SessionTimeout: '60' |
| 410 |
MaxConcurrency: '50' |
| 411 |
MaxRetryAttempts: '5' |
| 412 |
- task: EsrpCodeSigning@2 |
| 413 |
condition: eq(1,0) |
| 414 |
continueOnError: true |
| 415 |
displayName: 'Sign Symbol Package' |
| 416 |
inputs: |
| 417 |
ConnectedServiceName: 'z3-esrp-signing-2' |
| 418 |
FolderPath: $(Build.ArtifactStagingDirectory) |
| 419 |
Pattern: Microsoft.Z3.x86.$(NightlyVersion).snupkg |
| 420 |
signConfigType: 'inlineSignParams' |
| 421 |
inlineOperation: | |
| 422 |
[ |
| 423 |
{ |
| 424 |
"KeyCode" : "CP-401405", |
| 425 |
"OperationCode" : "NuGetSign", |
| 426 |
"Parameters" : {}, |
| 427 |
"ToolName" : "sign", |
| 428 |
"ToolVersion" : "1.0" |
| 429 |
}, |
| 430 |
{ |
| 431 |
"KeyCode" : "CP-401405", |
| 432 |
"OperationCode" : "NuGetVerify", |
| 433 |
"Parameters" : {}, |
| 434 |
"ToolName" : "sign", |
| 435 |
"ToolVersion" : "1.0" |
| 436 |
} |
| 437 |
] |
| 438 |
SessionTimeout: '60' |
| 439 |
MaxConcurrency: '50' |
| 440 |
MaxRetryAttempts: '5' |
| 441 |
- task: PublishPipelineArtifact@1 |
| 442 |
inputs: |
| 443 |
targetPath: $(Build.ArtifactStagingDirectory) |
| 444 |
artifactName: 'NuGet32' |
| 445 |
|
| 446 |
|
| 447 |
- job: Python |
| 448 |
displayName: "Python packaging" |
| 449 |
pool: |
| 450 |
vmImage: "ubuntu-latest" |
| 451 |
steps: |
| 452 |
- task: DownloadPipelineArtifact@2 |
| 453 |
displayName: 'Download macOS Build' |
| 454 |
inputs: |
| 455 |
artifactName: 'macOsBuild' |
| 456 |
targetPath: $(Agent.TempDirectory) |
| 457 |
- task: DownloadPipelineArtifact@2 |
| 458 |
displayName: 'Download macOS Arm64 Build' |
| 459 |
inputs: |
| 460 |
artifactName: 'MacArm64' |
| 461 |
targetPath: $(Agent.TempDirectory) |
| 462 |
- task: DownloadPipelineArtifact@2 |
| 463 |
displayName: 'Download Win64 Build' |
| 464 |
inputs: |
| 465 |
artifactName: 'WindowsBuild-x64' |
| 466 |
targetPath: $(Agent.TempDirectory) |
| 467 |
- task: DownloadPipelineArtifact@2 |
| 468 |
displayName: 'Download Win32 Build' |
| 469 |
inputs: |
| 470 |
artifactName: 'WindowsBuild-x86' |
| 471 |
targetPath: $(Agent.TempDirectory) |
| 472 |
- task: DownloadPipelineArtifact@2 |
| 473 |
displayName: 'Download ManyLinux Build' |
| 474 |
inputs: |
| 475 |
artifactName: 'ManyLinuxPythonBuildAMD64' |
| 476 |
targetPath: $(Agent.TempDirectory) |
| 477 |
- task: DownloadPipelineArtifact@2 |
| 478 |
displayName: 'Download ManyLinux Arm64 Build' |
| 479 |
inputs: |
| 480 |
artifactName: 'ManyLinuxPythonBuildArm64' |
| 481 |
targetPath: $(Agent.TempDirectory) |
| 482 |
- script: cd $(Agent.TempDirectory); mkdir osx-x64-bin; cd osx-x64-bin; unzip ../*x64-osx*.zip |
| 483 |
- script: cd $(Agent.TempDirectory); mkdir osx-arm64-bin; cd osx-arm64-bin; unzip ../*arm64-osx*.zip |
| 484 |
# - script: cd $(Agent.TempDirectory); mkdir musl-bin; cd musl-bin; unzip ../*-linux.zip |
| 485 |
- script: cd $(Agent.TempDirectory); mkdir win32-bin; cd win32-bin; unzip ../*x86-win*.zip |
| 486 |
- script: cd $(Agent.TempDirectory); mkdir win64-bin; cd win64-bin; unzip ../*x64-win*.zip |
| 487 |
- script: python3 -m pip install --user -U setuptools |
| 488 |
- script: cd src/api/python; python3 setup.py sdist |
| 489 |
# 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 |
| 490 |
# - script: cd src/api/python; echo $(Agent.TempDirectory)/musl-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel |
| 491 |
- 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 |
| 492 |
- 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 |
| 493 |
- script: cd src/api/python; echo $(Agent.TempDirectory)/osx-x64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel |
| 494 |
- script: cd src/api/python; echo $(Agent.TempDirectory)/osx-arm64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel |
| 495 |
- script: cp $(Agent.TempDirectory)/*.whl src/api/python/dist |
| 496 |
- task: PublishPipelineArtifact@0 |
| 497 |
inputs: |
| 498 |
artifactName: 'Python packages' |
| 499 |
targetPath: src/api/python/dist |
| 500 |
|
| 501 |
|
| 502 |
- stage: Deployment |
| 503 |
jobs: |
| 504 |
- job: Deploy |
| 505 |
displayName: "Deploy into GitHub" |
| 506 |
continueOnError: true |
| 507 |
pool: |
| 508 |
vmImage: "ubuntu-latest" |
| 509 |
steps: |
| 510 |
- task: DownloadPipelineArtifact@2 |
| 511 |
displayName: "Download windows32" |
| 512 |
inputs: |
| 513 |
artifactName: 'WindowsBuild-x86' |
| 514 |
targetPath: tmp |
| 515 |
- task: DownloadPipelineArtifact@2 |
| 516 |
displayName: "Download windows64" |
| 517 |
inputs: |
| 518 |
artifactName: 'WindowsBuild-x64' |
| 519 |
targetPath: tmp |
| 520 |
- task: DownloadPipelineArtifact@2 |
| 521 |
displayName: "Download windowsARM64" |
| 522 |
inputs: |
| 523 |
artifactName: 'WindowsBuild-arm64' |
| 524 |
targetPath: tmp |
| 525 |
- task: DownloadPipelineArtifact@2 |
| 526 |
displayName: "Download Mac" |
| 527 |
inputs: |
| 528 |
artifactName: 'macOsBuild' |
| 529 |
targetPath: tmp |
| 530 |
- task: DownloadPipelineArtifact@2 |
| 531 |
displayName: "Download MacArm64" |
| 532 |
inputs: |
| 533 |
artifactName: 'MacArm64' |
| 534 |
targetPath: tmp |
| 535 |
- task: DownloadPipelineArtifact@2 |
| 536 |
displayName: "Download Ubuntu Arm64" |
| 537 |
inputs: |
| 538 |
artifactName: 'UbuntuArm64' |
| 539 |
targetPath: tmp |
| 540 |
- task: DownloadPipelineArtifact@2 |
| 541 |
displayName: "Download Ubuntu" |
| 542 |
inputs: |
| 543 |
artifactName: 'UbuntuBuild' |
| 544 |
targetPath: tmp |
| 545 |
- task: DownloadPipelineArtifact@2 |
| 546 |
displayName: "Download Doc" |
| 547 |
inputs: |
| 548 |
artifactName: 'UbuntuDoc' |
| 549 |
targetPath: tmp |
| 550 |
- task: DownloadPipelineArtifact@2 |
| 551 |
displayName: "Download Python" |
| 552 |
inputs: |
| 553 |
artifactName: 'Python packages' |
| 554 |
targetPath: tmp |
| 555 |
- task: DownloadPipelineArtifact@2 |
| 556 |
displayName: "Download NuGet" |
| 557 |
inputs: |
| 558 |
artifactName: 'NuGet' |
| 559 |
targetPath: tmp |
| 560 |
- task: DownloadPipelineArtifact@2 |
| 561 |
displayName: "Download NuGet32" |
| 562 |
inputs: |
| 563 |
artifactName: 'NuGet32' |
| 564 |
targetPath: tmp |
| 565 |
- task: GitHubRelease@0 |
| 566 |
continueOnError: true |
| 567 |
inputs: |
| 568 |
gitHubConnection: Z3Prover |
| 569 |
repositoryName: 'Z3Prover/z3' |
| 570 |
action: 'delete' |
| 571 |
# target: '$(Build.SourceVersion)' |
| 572 |
tagSource: 'manual' |
| 573 |
tag: 'Nightly' |
| 574 |
- task: GitHubRelease@0 |
| 575 |
continueOnError: true |
| 576 |
inputs: |
| 577 |
gitHubConnection: Z3Prover |
| 578 |
repositoryName: 'Z3Prover/z3' |
| 579 |
action: 'create' |
| 580 |
# target: '$(Build.SourceVersion)' |
| 581 |
tagSource: 'manual' |
| 582 |
tag: 'Nightly' |
| 583 |
title: 'Nightly' |
| 584 |
releaseNotesSource: 'input' |
| 585 |
releaseNotes: 'nightly build' |
| 586 |
assets: 'tmp/*' |
| 587 |
assetUploadMode: 'replace' |
| 588 |
isDraft: false |
| 589 |
isPreRelease: true |
| 590 |
|
| 591 |
- stage: NugetPublishNightly |
| 592 |
jobs: |
| 593 |
# Publish to nightly feed on Azure |
| 594 |
- job: NuGetPublishNightly |
| 595 |
displayName: "Push nuget packages to Azure Feed" |
| 596 |
steps: |
| 597 |
- task: NuGetAuthenticate@0 |
| 598 |
displayName: 'NuGet Authenticate' |
| 599 |
- task: NuGetToolInstaller@0 |
| 600 |
inputs: |
| 601 |
versionSpec: 5.x |
| 602 |
checkLatest: false |
| 603 |
- task: DownloadPipelineArtifact@2 |
| 604 |
displayName: 'Download NuGet x86 Package' |
| 605 |
inputs: |
| 606 |
artifact: 'NuGet32' |
| 607 |
path: $(Agent.TempDirectory)/x86 |
| 608 |
- task: DownloadPipelineArtifact@2 |
| 609 |
displayName: 'Download NuGet x64 Package' |
| 610 |
inputs: |
| 611 |
artifact: 'NuGet' |
| 612 |
path: $(Agent.TempDirectory)/x64 |
| 613 |
- task: NuGetCommand@2 |
| 614 |
displayName: 'NuGet Nightly x64 push' |
| 615 |
inputs: |
| 616 |
command: push |
| 617 |
publishVstsFeed: 'Z3Build/Z3-Nightly-Builds' |
| 618 |
packagesToPush: $(Agent.TempDirectory)/x64/*.nupkg |
| 619 |
allowPackageConflicts: true |
| 620 |
- task: NuGetCommand@2 |
| 621 |
displayName: 'NuGet Nightly x86 push' |
| 622 |
inputs: |
| 623 |
command: push |
| 624 |
publishVstsFeed: 'Z3Build/Z3-Nightly-Builds' |
| 625 |
packagesToPush: $(Agent.TempDirectory)/x86/*.nupkg |
| 626 |
allowPackageConflicts: true |
| 627 |
|
| 628 |
|
| 629 |
# TBD: run regression tests on generated binaries. |