Debian Codegraph @

scripts/release.yml

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