mirror of
https://github.com/Z3Prover/z3
synced 2026-06-02 15:17:54 +00:00
remove obsoleted ADO workflows
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0ed85db8a2
commit
c89c01dedf
2 changed files with 0 additions and 1002 deletions
|
|
@ -1,487 +0,0 @@
|
||||||
variables:
|
|
||||||
# Version components read from VERSION.txt (updated manually when VERSION.txt changes)
|
|
||||||
Major: '4'
|
|
||||||
Minor: '15'
|
|
||||||
Patch: '6'
|
|
||||||
ReleaseVersion: $(Major).$(Minor).$(Patch)
|
|
||||||
NightlyVersion: $(Major).$(Minor).$(Patch).$(Build.BuildId)
|
|
||||||
# TODO: Auto-read from VERSION.txt when Azure DevOps supports it better
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- stage: Build
|
|
||||||
jobs:
|
|
||||||
- job: MacBuild
|
|
||||||
displayName: "Mac Build"
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
pool:
|
|
||||||
vmImage: "macOS-latest"
|
|
||||||
steps:
|
|
||||||
- task: PythonScript@0
|
|
||||||
displayName: Build
|
|
||||||
inputs:
|
|
||||||
scriptSource: 'filepath'
|
|
||||||
scriptPath: scripts/mk_unix_dist.py
|
|
||||||
arguments: --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk
|
|
||||||
- script: git clone https://github.com/z3prover/z3test z3test
|
|
||||||
displayName: 'Clone z3test'
|
|
||||||
- task: PythonScript@0
|
|
||||||
displayName: Test
|
|
||||||
inputs:
|
|
||||||
scriptSource: 'filepath'
|
|
||||||
scriptPath: z3test/scripts/test_benchmarks.py
|
|
||||||
arguments: build-dist/z3 z3test/regressions/smt2
|
|
||||||
- task: CopyFiles@2
|
|
||||||
inputs:
|
|
||||||
sourceFolder: dist
|
|
||||||
contents: '*.zip'
|
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
||||||
- task: PublishPipelineArtifact@0
|
|
||||||
inputs:
|
|
||||||
artifactName: 'macOsBuild'
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
|
|
||||||
- job: MacBuildArm64
|
|
||||||
displayName: "Mac ARM64 Build"
|
|
||||||
pool:
|
|
||||||
vmImage: "macOS-latest"
|
|
||||||
steps:
|
|
||||||
- script: python scripts/mk_unix_dist.py --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk --arch=arm64
|
|
||||||
- script: git clone https://github.com/z3prover/z3test z3test
|
|
||||||
- script: cp dist/*.zip $(Build.ArtifactStagingDirectory)/.
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
inputs:
|
|
||||||
artifactName: 'MacArm64'
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
|
|
||||||
- job: UbuntuBuild
|
|
||||||
displayName: "Ubuntu build"
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-latest"
|
|
||||||
steps:
|
|
||||||
- task: PythonScript@0
|
|
||||||
displayName: Build
|
|
||||||
inputs:
|
|
||||||
scriptSource: 'filepath'
|
|
||||||
scriptPath: scripts/mk_unix_dist.py
|
|
||||||
arguments: --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk
|
|
||||||
- script: git clone https://github.com/z3prover/z3test z3test
|
|
||||||
displayName: 'Clone z3test'
|
|
||||||
- task: PythonScript@0
|
|
||||||
displayName: Test
|
|
||||||
inputs:
|
|
||||||
scriptSource: 'filepath'
|
|
||||||
scriptPath: z3test/scripts/test_benchmarks.py
|
|
||||||
arguments: build-dist/z3 z3test/regressions/smt2
|
|
||||||
- task: CopyFiles@2
|
|
||||||
inputs:
|
|
||||||
sourceFolder: dist
|
|
||||||
contents: '*.zip'
|
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
||||||
- task: PublishPipelineArtifact@0
|
|
||||||
inputs:
|
|
||||||
artifactName: 'UbuntuBuild'
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
|
|
||||||
- job: UbuntuArm64
|
|
||||||
displayName: "Ubuntu ARM64 build"
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-latest"
|
|
||||||
steps:
|
|
||||||
- script: curl -L -o /tmp/arm-toolchain.tar.xz 'https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz'
|
|
||||||
- script: mkdir -p /tmp/arm-toolchain/
|
|
||||||
- script: tar xf /tmp/arm-toolchain.tar.xz -C /tmp/arm-toolchain/ --strip-components=1
|
|
||||||
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/bin'
|
|
||||||
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/aarch64-none-linux-gnu/libc/usr/bin'
|
|
||||||
- script: echo $PATH
|
|
||||||
- script: stat /tmp/arm-toolchain/bin/aarch64-none-linux-gnu-gcc
|
|
||||||
- script: python scripts/mk_unix_dist.py --nodotnet --arch=arm64
|
|
||||||
- task: CopyFiles@2
|
|
||||||
inputs:
|
|
||||||
sourceFolder: dist
|
|
||||||
contents: '*.zip'
|
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
||||||
- task: PublishPipelineArtifact@0
|
|
||||||
inputs:
|
|
||||||
artifactName: 'UbuntuArm64'
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
|
|
||||||
- job: UbuntuDoc
|
|
||||||
displayName: "Ubuntu Doc build"
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-latest"
|
|
||||||
steps:
|
|
||||||
- script: pip3 install importlib-resources
|
|
||||||
- script: sudo apt-get install ocaml opam libgmp-dev
|
|
||||||
- script: opam init -y
|
|
||||||
- script: eval `opam config env`; opam install zarith ocamlfind -y
|
|
||||||
- script: eval `opam config env`; python scripts/mk_make.py --ml
|
|
||||||
- script: sudo apt-get install doxygen
|
|
||||||
- script: sudo apt-get install graphviz
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
cd build
|
|
||||||
eval `opam config env`
|
|
||||||
make -j3
|
|
||||||
make -j3 examples
|
|
||||||
make -j3 test-z3
|
|
||||||
cd ..
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
eval `opam config env`
|
|
||||||
cd doc
|
|
||||||
python3 mk_api_doc.py --mld --z3py-package-path=../build/python/z3
|
|
||||||
python3 mk_params_doc.py
|
|
||||||
mkdir api/html/ml
|
|
||||||
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
|
|
||||||
cd ..
|
|
||||||
- script: zip -r z3doc.zip doc/api
|
|
||||||
- script: cp z3doc.zip $(Build.ArtifactStagingDirectory)/.
|
|
||||||
- task: PublishPipelineArtifact@0
|
|
||||||
inputs:
|
|
||||||
artifactName: 'UbuntuDoc'
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
# TODO copy artifacts
|
|
||||||
|
|
||||||
- job: "ManylinuxPythonBuildAmd64"
|
|
||||||
displayName: "Python bindings (manylinux Centos AMD64) build"
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-latest"
|
|
||||||
container: "quay.io/pypa/manylinux2014_x86_64:latest"
|
|
||||||
steps:
|
|
||||||
- script: "/opt/python/cp38-cp38/bin/python -m venv $PWD/env"
|
|
||||||
- script: 'echo "##vso[task.prependpath]$PWD/env/bin"'
|
|
||||||
- script: "pip install build git+https://github.com/rhelmot/auditwheel" # @TODO remove when patches make it upstream
|
|
||||||
- script: "cd src/api/python && python -m build && AUDITWHEEL_PLAT= auditwheel repair --best-plat dist/*.whl && cd ../../.."
|
|
||||||
- script: "pip install ./src/api/python/wheelhouse/*.whl && python - <src/api/python/z3test.py z3 && python - <src/api/python/z3test.py z3num"
|
|
||||||
- task: CopyFiles@2
|
|
||||||
inputs:
|
|
||||||
sourceFolder: src/api/python/wheelhouse
|
|
||||||
contents: '*.whl'
|
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
||||||
- task: PublishPipelineArtifact@0
|
|
||||||
inputs:
|
|
||||||
artifactName: 'ManyLinuxPythonBuildAMD64'
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
|
|
||||||
- job: ManyLinuxPythonBuildArm64
|
|
||||||
displayName: "Python bindings (manylinux Centos ARM64 cross) build"
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
variables:
|
|
||||||
name: ManyLinux
|
|
||||||
python: "/opt/python/cp37-cp37m/bin/python"
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-latest"
|
|
||||||
container: "quay.io/pypa/manylinux2014_x86_64:latest"
|
|
||||||
steps:
|
|
||||||
- script: curl -L -o /tmp/arm-toolchain.tar.xz 'https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz'
|
|
||||||
- script: mkdir -p /tmp/arm-toolchain/
|
|
||||||
- script: tar xf /tmp/arm-toolchain.tar.xz -C /tmp/arm-toolchain/ --strip-components=1
|
|
||||||
- script: "/opt/python/cp38-cp38/bin/python -m venv $PWD/env"
|
|
||||||
- script: 'echo "##vso[task.prependpath]$PWD/env/bin"'
|
|
||||||
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/bin'
|
|
||||||
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/aarch64-none-linux-gnu/libc/usr/bin'
|
|
||||||
- script: echo $PATH
|
|
||||||
- script: "stat `which aarch64-none-linux-gnu-gcc`"
|
|
||||||
- script: "pip install build git+https://github.com/rhelmot/auditwheel"
|
|
||||||
- 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 ../../.."
|
|
||||||
- task: CopyFiles@2
|
|
||||||
inputs:
|
|
||||||
sourceFolder: src/api/python/wheelhouse
|
|
||||||
contents: '*.whl'
|
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
||||||
- task: PublishPipelineArtifact@0
|
|
||||||
inputs:
|
|
||||||
artifactName: 'ManyLinuxPythonBuildArm64'
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
|
|
||||||
- template: build-win-signed.yml
|
|
||||||
parameters:
|
|
||||||
ReleaseVersion: $(ReleaseVersion)
|
|
||||||
BuildArchitecture: 'x64'
|
|
||||||
|
|
||||||
- template: build-win-signed.yml
|
|
||||||
parameters:
|
|
||||||
ReleaseVersion: $(ReleaseVersion)
|
|
||||||
BuildArchitecture: 'x86'
|
|
||||||
|
|
||||||
- template: build-win-signed-cmake.yml
|
|
||||||
parameters:
|
|
||||||
ReleaseVersion: $(ReleaseVersion)
|
|
||||||
BuildArchitecture: 'arm64'
|
|
||||||
VCArchitecture: 'amd64_arm64'
|
|
||||||
|
|
||||||
- stage: Package
|
|
||||||
jobs:
|
|
||||||
- job: NuGet64
|
|
||||||
displayName: "NuGet 64 packaging"
|
|
||||||
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: 'WindowsBuild-x64'
|
|
||||||
path: $(Agent.TempDirectory)\package
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download Win ARM64 Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'WindowsBuild-arm64'
|
|
||||||
path: $(Agent.TempDirectory)\package
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download Ubuntu Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'UbuntuBuild'
|
|
||||||
path: $(Agent.TempDirectory)\package
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download Ubuntu ARM64 Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'UbuntuArm64'
|
|
||||||
path: $(Agent.TempDirectory)\package
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download macOS Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'macOsBuild'
|
|
||||||
path: $(Agent.TempDirectory)\package
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download macOS Arm64 Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'MacArm64'
|
|
||||||
path: $(Agent.TempDirectory)\package
|
|
||||||
- task: NuGetToolInstaller@1
|
|
||||||
inputs:
|
|
||||||
versionSpec: 6.x
|
|
||||||
checkLatest: false
|
|
||||||
- task: PythonScript@0
|
|
||||||
displayName: 'Python: assemble files'
|
|
||||||
inputs:
|
|
||||||
scriptSource: 'filepath'
|
|
||||||
scriptPath: scripts\mk_nuget_task.py
|
|
||||||
workingDirectory: $(Agent.TempDirectory)\package
|
|
||||||
arguments:
|
|
||||||
$(Agent.TempDirectory)\package
|
|
||||||
$(NightlyVersion)
|
|
||||||
$(Build.Repository.Uri)
|
|
||||||
$(Build.SourceBranchName)
|
|
||||||
$(Build.SourceVersion)
|
|
||||||
$(Build.SourcesDirectory)
|
|
||||||
symbols
|
|
||||||
- task: NugetCommand@2
|
|
||||||
displayName: 'NuGet Pack Symbols'
|
|
||||||
inputs:
|
|
||||||
command: custom
|
|
||||||
versioningScheme: byPrereleaseNumber
|
|
||||||
majorVersion: $(Major)
|
|
||||||
minorVersion: $(Minor)
|
|
||||||
patchVersion: $(Patch)
|
|
||||||
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'
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
inputs:
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
artifactName: 'NuGet'
|
|
||||||
|
|
||||||
- job: NuGet32
|
|
||||||
displayName: "NuGet 32 packaging"
|
|
||||||
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 Win32 Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'WindowsBuild-x86'
|
|
||||||
path: $(Agent.TempDirectory)\package
|
|
||||||
- task: NuGetToolInstaller@1
|
|
||||||
inputs:
|
|
||||||
versionSpec: 6.x
|
|
||||||
checkLatest: false
|
|
||||||
- task: PythonScript@0
|
|
||||||
displayName: 'Python: assemble files'
|
|
||||||
inputs:
|
|
||||||
scriptSource: 'filepath'
|
|
||||||
scriptPath: scripts\mk_nuget_task.py
|
|
||||||
workingDirectory: $(Agent.TempDirectory)\package
|
|
||||||
arguments:
|
|
||||||
$(Agent.TempDirectory)\package
|
|
||||||
$(NightlyVersion)
|
|
||||||
$(Build.Repository.Uri)
|
|
||||||
$(Build.SourceBranchName)
|
|
||||||
$(Build.SourceVersion)
|
|
||||||
$(Build.SourcesDirectory)
|
|
||||||
symbols
|
|
||||||
x86
|
|
||||||
- task: NugetCommand@2
|
|
||||||
displayName: 'NuGet Pack Symbols'
|
|
||||||
inputs:
|
|
||||||
command: custom
|
|
||||||
versioningScheme: byPrereleaseNumber
|
|
||||||
majorVersion: $(Major)
|
|
||||||
minorVersion: $(Minor)
|
|
||||||
patchVersion: $(Patch)
|
|
||||||
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'
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
inputs:
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
artifactName: 'NuGet32'
|
|
||||||
|
|
||||||
|
|
||||||
- job: Python
|
|
||||||
displayName: "Python packaging"
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-24.04"
|
|
||||||
steps:
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download macOS Build'
|
|
||||||
inputs:
|
|
||||||
artifactName: 'macOsBuild'
|
|
||||||
targetPath: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download macOS Arm64 Build'
|
|
||||||
inputs:
|
|
||||||
artifactName: 'MacArm64'
|
|
||||||
targetPath: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download Win64 Build'
|
|
||||||
inputs:
|
|
||||||
artifactName: 'WindowsBuild-x64'
|
|
||||||
targetPath: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download Win32 Build'
|
|
||||||
inputs:
|
|
||||||
artifactName: 'WindowsBuild-x86'
|
|
||||||
targetPath: $(Agent.TempDirectory)
|
|
||||||
# - task: DownloadPipelineArtifact@2
|
|
||||||
# displayName: 'Download ManyLinux Build'
|
|
||||||
# inputs:
|
|
||||||
# artifactName: 'ManyLinuxPythonBuildAMD64'
|
|
||||||
# targetPath: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download ManyLinux Arm64 Build'
|
|
||||||
inputs:
|
|
||||||
artifactName: 'ManyLinuxPythonBuildArm64'
|
|
||||||
targetPath: $(Agent.TempDirectory)
|
|
||||||
# - script: cd $(Agent.TempDirectory); mkdir osx-x64-bin; cd osx-x64-bin; unzip ../*x64-osx*.zip
|
|
||||||
- script: cd $(Agent.TempDirectory); mkdir osx-arm64-bin; cd osx-arm64-bin; unzip ../*arm64-osx*.zip
|
|
||||||
# - script: cd $(Agent.TempDirectory); mkdir musl-bin; cd musl-bin; unzip ../*-linux.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
|
|
||||||
- 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)/musl-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-x64-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-arm64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
|
|
||||||
- script: cp $(Agent.TempDirectory)/*.whl src/api/python/dist
|
|
||||||
- task: PublishPipelineArtifact@0
|
|
||||||
inputs:
|
|
||||||
artifactName: 'Python packages'
|
|
||||||
targetPath: src/api/python/dist
|
|
||||||
|
|
||||||
|
|
||||||
- stage: Deployment
|
|
||||||
jobs:
|
|
||||||
- job: Deploy
|
|
||||||
displayName: "Deploy into GitHub"
|
|
||||||
continueOnError: true
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-latest"
|
|
||||||
steps:
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: "Download windows32"
|
|
||||||
inputs:
|
|
||||||
artifactName: 'WindowsBuild-x86'
|
|
||||||
targetPath: tmp
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: "Download windows64"
|
|
||||||
inputs:
|
|
||||||
artifactName: 'WindowsBuild-x64'
|
|
||||||
targetPath: tmp
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: "Download windowsARM64"
|
|
||||||
inputs:
|
|
||||||
artifactName: 'WindowsBuild-arm64'
|
|
||||||
targetPath: tmp
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: "Download Mac"
|
|
||||||
inputs:
|
|
||||||
artifactName: 'macOsBuild'
|
|
||||||
targetPath: tmp
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: "Download MacArm64"
|
|
||||||
inputs:
|
|
||||||
artifactName: 'MacArm64'
|
|
||||||
targetPath: tmp
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: "Download Ubuntu Arm64"
|
|
||||||
inputs:
|
|
||||||
artifactName: 'UbuntuArm64'
|
|
||||||
targetPath: tmp
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: "Download Ubuntu"
|
|
||||||
inputs:
|
|
||||||
artifactName: 'UbuntuBuild'
|
|
||||||
targetPath: tmp
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: "Download Doc"
|
|
||||||
inputs:
|
|
||||||
artifactName: 'UbuntuDoc'
|
|
||||||
targetPath: tmp
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: "Download Python"
|
|
||||||
inputs:
|
|
||||||
artifactName: 'Python packages'
|
|
||||||
targetPath: tmp
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: "Download NuGet"
|
|
||||||
inputs:
|
|
||||||
artifactName: 'NuGet'
|
|
||||||
targetPath: tmp
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: "Download NuGet32"
|
|
||||||
inputs:
|
|
||||||
artifactName: 'NuGet32'
|
|
||||||
targetPath: tmp
|
|
||||||
- task: GitHubRelease@1
|
|
||||||
continueOnError: true
|
|
||||||
inputs:
|
|
||||||
gitHubConnection: Z3Prover
|
|
||||||
repositoryName: 'Z3Prover/z3'
|
|
||||||
action: 'delete'
|
|
||||||
# target: '$(Build.SourceVersion)'
|
|
||||||
tagSource: 'userSpecifiedTag'
|
|
||||||
tag: 'Nightly'
|
|
||||||
- task: GitHubRelease@1
|
|
||||||
continueOnError: true
|
|
||||||
inputs:
|
|
||||||
gitHubConnection: Z3Prover
|
|
||||||
repositoryName: $(Build.Repository.Name)
|
|
||||||
action: 'create'
|
|
||||||
target: '$(Build.SourceVersion)'
|
|
||||||
tagSource: 'userSpecifiedTag'
|
|
||||||
tag: 'Nightly'
|
|
||||||
title: 'Nightly'
|
|
||||||
releaseNotesSource: 'inline'
|
|
||||||
releaseNotes: 'nightly build'
|
|
||||||
assets: 'tmp/*'
|
|
||||||
assetUploadMode: 'replace'
|
|
||||||
isDraft: false
|
|
||||||
isPreRelease: true
|
|
||||||
|
|
||||||
|
|
||||||
# TBD: run regression tests on generated binaries.
|
|
||||||
|
|
@ -1,515 +0,0 @@
|
||||||
# Release pipeline (must be triggered manually)
|
|
||||||
# * Builds for all platforms (with code signing)
|
|
||||||
# * Creates packages for Python and NuGet
|
|
||||||
# * Uploads build products to stores (GitHub, NuGet, PyPI)
|
|
||||||
|
|
||||||
trigger: none
|
|
||||||
|
|
||||||
variables:
|
|
||||||
ReleaseVersion: '4.15.6' # TODO: Auto-read from VERSION.txt when Azure DevOps supports it better
|
|
||||||
|
|
||||||
stages:
|
|
||||||
|
|
||||||
# Builds Z3 on various platforms
|
|
||||||
- stage: Build
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
- job: MacBuild
|
|
||||||
displayName: "Mac Build"
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
pool:
|
|
||||||
vmImage: "macOS-13"
|
|
||||||
steps:
|
|
||||||
- task: PythonScript@0
|
|
||||||
displayName: Build
|
|
||||||
inputs:
|
|
||||||
scriptSource: 'filepath'
|
|
||||||
scriptPath: scripts/mk_unix_dist.py
|
|
||||||
arguments: --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk
|
|
||||||
- script: git clone https://github.com/z3prover/z3test z3test
|
|
||||||
displayName: 'Clone z3test'
|
|
||||||
- task: PythonScript@0
|
|
||||||
displayName: Test
|
|
||||||
inputs:
|
|
||||||
scriptSource: 'filepath'
|
|
||||||
scriptPath: z3test/scripts/test_benchmarks.py
|
|
||||||
arguments: build-dist/z3 z3test/regressions/smt2
|
|
||||||
- task: CopyFiles@2
|
|
||||||
inputs:
|
|
||||||
sourceFolder: dist
|
|
||||||
contents: '*.zip'
|
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
||||||
- task: PublishPipelineArtifact@0
|
|
||||||
inputs:
|
|
||||||
artifactName: 'macOsBuild'
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
|
|
||||||
- job: MacBuildArm64
|
|
||||||
displayName: "Mac ARM64 Build"
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
pool:
|
|
||||||
vmImage: "macOS-13"
|
|
||||||
steps:
|
|
||||||
- script: python scripts/mk_unix_dist.py --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk --arch=arm64
|
|
||||||
- script: git clone https://github.com/z3prover/z3test z3test
|
|
||||||
- script: cp dist/*.zip $(Build.ArtifactStagingDirectory)/.
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
inputs:
|
|
||||||
artifactName: 'MacArm64'
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
|
|
||||||
- job: UbuntuBuild
|
|
||||||
displayName: "Ubuntu build"
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-latest"
|
|
||||||
steps:
|
|
||||||
- task: PythonScript@0
|
|
||||||
displayName: Build
|
|
||||||
inputs:
|
|
||||||
scriptSource: 'filepath'
|
|
||||||
scriptPath: scripts/mk_unix_dist.py
|
|
||||||
arguments: --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk
|
|
||||||
- script: git clone https://github.com/z3prover/z3test z3test
|
|
||||||
displayName: 'Clone z3test'
|
|
||||||
- task: PythonScript@0
|
|
||||||
displayName: Test
|
|
||||||
inputs:
|
|
||||||
scriptSource: 'filepath'
|
|
||||||
scriptPath: z3test/scripts/test_benchmarks.py
|
|
||||||
arguments: build-dist/z3 z3test/regressions/smt2
|
|
||||||
- task: CopyFiles@2
|
|
||||||
inputs:
|
|
||||||
sourceFolder: dist
|
|
||||||
contents: '*.zip'
|
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
||||||
- task: PublishPipelineArtifact@0
|
|
||||||
inputs:
|
|
||||||
artifactName: 'UbuntuBuild'
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
|
|
||||||
|
|
||||||
- job: UbuntuArm64
|
|
||||||
displayName: "Ubuntu ARM64 build"
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-latest"
|
|
||||||
steps:
|
|
||||||
- script: curl -L -o /tmp/arm-toolchain.tar.xz 'https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz'
|
|
||||||
- script: mkdir -p /tmp/arm-toolchain/
|
|
||||||
- script: tar xf /tmp/arm-toolchain.tar.xz -C /tmp/arm-toolchain/ --strip-components=1
|
|
||||||
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/bin'
|
|
||||||
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/aarch64-none-linux-gnu/libc/usr/bin'
|
|
||||||
- script: echo $PATH
|
|
||||||
- script: stat /tmp/arm-toolchain/bin/aarch64-none-linux-gnu-gcc
|
|
||||||
- script: python scripts/mk_unix_dist.py --nodotnet --arch=arm64
|
|
||||||
- task: CopyFiles@2
|
|
||||||
inputs:
|
|
||||||
sourceFolder: dist
|
|
||||||
contents: '*.zip'
|
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
||||||
- task: PublishPipelineArtifact@0
|
|
||||||
inputs:
|
|
||||||
artifactName: 'UbuntuArm64'
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
|
|
||||||
- job: UbuntuDoc
|
|
||||||
displayName: "Ubuntu Doc build"
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-latest"
|
|
||||||
steps:
|
|
||||||
- script: pip3 install importlib-resources
|
|
||||||
- script: sudo apt-get install ocaml opam libgmp-dev
|
|
||||||
- script: opam init -y
|
|
||||||
- script: eval `opam config env`; opam install zarith ocamlfind -y
|
|
||||||
- script: eval `opam config env`; python scripts/mk_make.py --ml
|
|
||||||
- script: sudo apt-get install doxygen
|
|
||||||
- script: sudo apt-get install graphviz
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
cd build
|
|
||||||
eval `opam config env`
|
|
||||||
make -j3
|
|
||||||
make -j3 examples
|
|
||||||
make -j3 test-z3
|
|
||||||
cd ..
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
eval `opam config env`
|
|
||||||
cd doc
|
|
||||||
python3 mk_api_doc.py --mld --z3py-package-path=../build/python/z3
|
|
||||||
python3 mk_params_doc.py
|
|
||||||
mkdir api/html/ml
|
|
||||||
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
|
|
||||||
cd ..
|
|
||||||
- script: zip -r z3doc.zip doc/api
|
|
||||||
- script: cp z3doc.zip $(Build.ArtifactStagingDirectory)/.
|
|
||||||
- task: PublishPipelineArtifact@0
|
|
||||||
inputs:
|
|
||||||
artifactName: 'UbuntuDoc'
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
|
|
||||||
- job: "ManylinuxPythonBuildAmd64"
|
|
||||||
displayName: "Python bindings (manylinux Centos AMD64) build"
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-latest"
|
|
||||||
container: "quay.io/pypa/manylinux2014_x86_64:latest"
|
|
||||||
steps:
|
|
||||||
- script: "/opt/python/cp38-cp38/bin/python -m venv $PWD/env"
|
|
||||||
- script: 'echo "##vso[task.prependpath]$PWD/env/bin"'
|
|
||||||
- script: "pip install build git+https://github.com/rhelmot/auditwheel" # @TODO remove when patches make it upstream
|
|
||||||
- script: "cd src/api/python && python -m build && AUDITWHEEL_PLAT= auditwheel repair --best-plat dist/*.whl && cd ../../.."
|
|
||||||
- script: "pip install ./src/api/python/wheelhouse/*.whl && python - <src/api/python/z3test.py z3 && python - <src/api/python/z3test.py z3num"
|
|
||||||
- task: CopyFiles@2
|
|
||||||
inputs:
|
|
||||||
sourceFolder: src/api/python/wheelhouse
|
|
||||||
contents: '*.whl'
|
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
||||||
- task: PublishPipelineArtifact@0
|
|
||||||
inputs:
|
|
||||||
artifactName: 'ManyLinuxPythonBuildAMD64'
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
|
|
||||||
- job: ManyLinuxPythonBuildArm64
|
|
||||||
displayName: "Python bindings (manylinux Centos ARM64 cross) build"
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
variables:
|
|
||||||
name: ManyLinux
|
|
||||||
python: "/opt/python/cp37-cp37m/bin/python"
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-latest"
|
|
||||||
container: "quay.io/pypa/manylinux2014_x86_64:latest"
|
|
||||||
steps:
|
|
||||||
- script: curl -L -o /tmp/arm-toolchain.tar.xz 'https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz'
|
|
||||||
- script: mkdir -p /tmp/arm-toolchain/
|
|
||||||
- script: tar xf /tmp/arm-toolchain.tar.xz -C /tmp/arm-toolchain/ --strip-components=1
|
|
||||||
- script: "/opt/python/cp38-cp38/bin/python -m venv $PWD/env"
|
|
||||||
- script: 'echo "##vso[task.prependpath]$PWD/env/bin"'
|
|
||||||
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/bin'
|
|
||||||
- script: echo '##vso[task.prependpath]/tmp/arm-toolchain/aarch64-none-linux-gnu/libc/usr/bin'
|
|
||||||
- script: echo $PATH
|
|
||||||
- script: "stat `which aarch64-none-linux-gnu-gcc`"
|
|
||||||
- script: "pip install build git+https://github.com/rhelmot/auditwheel"
|
|
||||||
- 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 ../../.."
|
|
||||||
- task: CopyFiles@2
|
|
||||||
inputs:
|
|
||||||
sourceFolder: src/api/python/wheelhouse
|
|
||||||
contents: '*.whl'
|
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
||||||
- task: PublishPipelineArtifact@0
|
|
||||||
inputs:
|
|
||||||
artifactName: 'ManyLinuxPythonBuildArm64'
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
|
|
||||||
|
|
||||||
- template: build-win-signed.yml
|
|
||||||
parameters:
|
|
||||||
ReleaseVersion: $(ReleaseVersion)
|
|
||||||
BuildArchitecture: 'x64'
|
|
||||||
|
|
||||||
- template: build-win-signed.yml
|
|
||||||
parameters:
|
|
||||||
ReleaseVersion: $(ReleaseVersion)
|
|
||||||
BuildArchitecture: 'x86'
|
|
||||||
|
|
||||||
- template: build-win-signed-cmake.yml
|
|
||||||
parameters:
|
|
||||||
ReleaseVersion: $(ReleaseVersion)
|
|
||||||
BuildArchitecture: 'arm64'
|
|
||||||
VCArchitecture: 'amd64_arm64'
|
|
||||||
|
|
||||||
|
|
||||||
# Creates Z3 packages in various formats
|
|
||||||
- stage: Package
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
- job: NuGet64
|
|
||||||
displayName: "NuGet 64 packaging"
|
|
||||||
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: 'WindowsBuild-x64'
|
|
||||||
path: $(Agent.TempDirectory)\package
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download Win ARM64 Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'WindowsBuild-arm64'
|
|
||||||
path: $(Agent.TempDirectory)\package
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download Ubuntu Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'UbuntuBuild'
|
|
||||||
path: $(Agent.TempDirectory)\package
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download Ubuntu ARM64 Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'UbuntuArm64'
|
|
||||||
path: $(Agent.TempDirectory)\package
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download macOS Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'macOsBuild'
|
|
||||||
path: $(Agent.TempDirectory)\package
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download macOS Arm64 Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'MacArm64'
|
|
||||||
path: $(Agent.TempDirectory)\package
|
|
||||||
|
|
||||||
- task: NuGetToolInstaller@1
|
|
||||||
inputs:
|
|
||||||
versionSpec: 6.x
|
|
||||||
checkLatest: false
|
|
||||||
- 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)
|
|
||||||
symbols
|
|
||||||
- task: NugetCommand@2
|
|
||||||
displayName: 'NuGet Pack Symbols'
|
|
||||||
inputs:
|
|
||||||
command: custom
|
|
||||||
arguments: 'pack $(Agent.TempDirectory)\package\out\Microsoft.Z3.sym.nuspec -OutputDirectory $(Build.ArtifactStagingDirectory) -Verbosity detailed -Symbols -SymbolPackageFormat snupkg -BasePath $(Agent.TempDirectory)\package\out'
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
inputs:
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
artifactName: 'NuGet'
|
|
||||||
|
|
||||||
- job: NuGet32
|
|
||||||
displayName: "NuGet 32 packaging"
|
|
||||||
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 Win32 Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'WindowsBuild-x86'
|
|
||||||
path: $(Agent.TempDirectory)\package
|
|
||||||
- task: NuGetToolInstaller@1
|
|
||||||
inputs:
|
|
||||||
versionSpec: 6.x
|
|
||||||
checkLatest: false
|
|
||||||
- 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)
|
|
||||||
symbols
|
|
||||||
x86
|
|
||||||
- task: NugetCommand@2
|
|
||||||
displayName: 'NuGet Pack Symbols'
|
|
||||||
inputs:
|
|
||||||
command: custom
|
|
||||||
arguments: 'pack $(Agent.TempDirectory)\package\out\Microsoft.Z3.x86.sym.nuspec -OutputDirectory $(Build.ArtifactStagingDirectory) -Verbosity detailed -Symbols -SymbolPackageFormat snupkg -BasePath $(Agent.TempDirectory)\package\out'
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
inputs:
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
artifactName: 'NuGet32'
|
|
||||||
|
|
||||||
|
|
||||||
- job: Python
|
|
||||||
displayName: "Python packaging"
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-24.04"
|
|
||||||
steps:
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download macOS Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'macOsBuild'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download macOS Arm64 Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'MacArm64'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download Win32 Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'WindowsBuild-x86'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download Win64 Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'WindowsBuild-x64'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download ManyLinux Build'
|
|
||||||
inputs:
|
|
||||||
artifactName: 'ManyLinuxPythonBuildAMD64'
|
|
||||||
targetPath: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download ManyLinux Arm64 Build'
|
|
||||||
inputs:
|
|
||||||
artifactName: 'ManyLinuxPythonBuildArm64'
|
|
||||||
targetPath: $(Agent.TempDirectory)
|
|
||||||
- script: cd $(Agent.TempDirectory); mkdir osx-x64-bin; cd osx-x64-bin; unzip ../*x64-osx*.zip
|
|
||||||
- script: cd $(Agent.TempDirectory); mkdir osx-arm64-bin; cd osx-arm64-bin; unzip ../*arm64-osx*.zip
|
|
||||||
# - script: cd $(Agent.TempDirectory); mkdir musl-bin; cd musl-bin; unzip ../*-linux.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
|
|
||||||
- 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)/musl-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-x64-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-arm64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
|
|
||||||
- script: cp $(Agent.TempDirectory)/*.whl src/api/python/dist
|
|
||||||
- task: PublishPipelineArtifact@0
|
|
||||||
inputs:
|
|
||||||
artifactName: 'PythonPackage'
|
|
||||||
targetPath: src/api/python/dist
|
|
||||||
|
|
||||||
# Uploads Z3 packages to various package stores
|
|
||||||
- stage: Publish
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
- job: GitHubPublish
|
|
||||||
condition: eq(1,1)
|
|
||||||
displayName: "Publish to GitHub"
|
|
||||||
pool:
|
|
||||||
vmImage: "windows-latest"
|
|
||||||
steps:
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download Ubuntu Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'UbuntuBuild'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: "Download Ubuntu Arm64"
|
|
||||||
inputs:
|
|
||||||
artifactName: 'UbuntuArm64'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: "Download Doc"
|
|
||||||
inputs:
|
|
||||||
artifact: 'UbuntuDoc'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download macOS Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'macOsBuild'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download macOSArm64 Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'MacArm64'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download Win32 Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'WindowsBuild-x86'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download Win64 Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'WindowsBuild-x64'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download Arm64 Build'
|
|
||||||
inputs:
|
|
||||||
artifact: 'WindowsBuild-arm64'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: "Download Python"
|
|
||||||
inputs:
|
|
||||||
artifactName: 'PythonPackage'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download NuGet64 Package'
|
|
||||||
inputs:
|
|
||||||
artifact: 'NuGet'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download NuGet32 Package'
|
|
||||||
inputs:
|
|
||||||
artifact: 'NuGet32'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: GitHubRelease@1
|
|
||||||
inputs:
|
|
||||||
gitHubConnection: Z3Prover
|
|
||||||
repositoryName: $(Build.Repository.Name)
|
|
||||||
action: 'create'
|
|
||||||
target: '$(Build.SourceVersion)'
|
|
||||||
tagSource: 'userSpecifiedTag'
|
|
||||||
tag: 'z3-$(ReleaseVersion)'
|
|
||||||
title: 'z3-$(ReleaseVersion)'
|
|
||||||
releaseNotesSource: 'inline'
|
|
||||||
releaseNotes: '$(ReleaseVersion) release'
|
|
||||||
assets: '$(Agent.TempDirectory)/*.*'
|
|
||||||
isDraft: true
|
|
||||||
isPreRelease: true
|
|
||||||
|
|
||||||
|
|
||||||
- job: NuGetPublish
|
|
||||||
condition: eq(0,1)
|
|
||||||
displayName: "Publish to NuGet.org"
|
|
||||||
steps:
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: 'Download NuGet Package'
|
|
||||||
inputs:
|
|
||||||
artifact: 'NuGetPackage'
|
|
||||||
path: $(Agent.TempDirectory)
|
|
||||||
- task: NuGetToolInstaller@1
|
|
||||||
inputs:
|
|
||||||
versionSpec: 6.x
|
|
||||||
checkLatest: false
|
|
||||||
- task: NuGetCommand@2
|
|
||||||
inputs:
|
|
||||||
command: push
|
|
||||||
nuGetFeedType: External
|
|
||||||
publishFeedCredentials: $(NugetZ3)
|
|
||||||
packagesToPush: $(Agent.TempDirectory)/*.nupkg
|
|
||||||
|
|
||||||
# Enable on release:
|
|
||||||
- job: PyPIPublish
|
|
||||||
condition: eq(1,1)
|
|
||||||
displayName: "Publish to PyPI"
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-latest"
|
|
||||||
steps:
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
inputs:
|
|
||||||
artifact: 'PythonPackage'
|
|
||||||
path: dist
|
|
||||||
- task: DownloadSecureFile@1
|
|
||||||
name: pypircs
|
|
||||||
inputs:
|
|
||||||
secureFile: 'pypircs'
|
|
||||||
- script: python3 -m pip install --upgrade pip
|
|
||||||
- script: python3 -m pip install --user -U setuptools importlib_metadata wheel twine
|
|
||||||
- script: python3 -m twine upload --config-file $(pypircs.secureFilePath) -r $(pypiReleaseServer) dist/*
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue