mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
Merge branch 'master' into sls
This commit is contained in:
commit
5d9d134151
406 changed files with 17512 additions and 8359 deletions
|
@ -8,7 +8,7 @@
|
|||
from mk_util import *
|
||||
|
||||
def init_version():
|
||||
set_version(4, 13, 1, 0) # express a default build version or pick up ci build version
|
||||
set_version(4, 13, 3, 0) # express a default build version or pick up ci build version
|
||||
|
||||
# Z3 Project definition
|
||||
def init_project_def():
|
||||
|
|
|
@ -2007,11 +2007,11 @@ class MLComponent(Component):
|
|||
src_dir = self.to_src_dir
|
||||
mk_dir(os.path.join(BUILD_DIR, self.sub_dir))
|
||||
api_src = get_component(API_COMPONENT).to_src_dir
|
||||
# remove /GL and -std=c++17; the ocaml tools don't like them.
|
||||
# remove /GL and -std=c++20; the ocaml tools don't like them.
|
||||
if IS_WINDOWS:
|
||||
out.write('CXXFLAGS_OCAML=$(CXXFLAGS:/GL=)\n')
|
||||
else:
|
||||
out.write('CXXFLAGS_OCAML=$(subst -std=c++17,,$(CXXFLAGS))\n')
|
||||
out.write('CXXFLAGS_OCAML=$(subst -std=c++20,,$(CXXFLAGS))\n')
|
||||
|
||||
substitutions = { 'VERSION': "{}.{}.{}.{}".format(VER_MAJOR, VER_MINOR, VER_BUILD, VER_TWEAK) }
|
||||
|
||||
|
@ -2500,7 +2500,7 @@ def mk_config():
|
|||
config = open(os.path.join(BUILD_DIR, 'config.mk'), 'w')
|
||||
global CXX, CC, GMP, GUARD_CF, STATIC_BIN, GIT_HASH, CPPFLAGS, CXXFLAGS, LDFLAGS, EXAMP_DEBUG_FLAG, FPMATH_FLAGS, LOG_SYNC, SINGLE_THREADED, IS_ARCH_ARM64
|
||||
if IS_WINDOWS:
|
||||
CXXFLAGS = '/nologo /Zi /D WIN32 /D _WINDOWS /EHsc /GS /Gd /std:c++17'
|
||||
CXXFLAGS = '/nologo /Zi /D WIN32 /D _WINDOWS /EHsc /GS /Gd /std:c++20'
|
||||
config.write(
|
||||
'CC=cl\n'
|
||||
'CXX=cl\n'
|
||||
|
@ -2616,7 +2616,7 @@ def mk_config():
|
|||
CPPFLAGS = '%s -D_MP_INTERNAL' % CPPFLAGS
|
||||
if GIT_HASH:
|
||||
CPPFLAGS = '%s -DZ3GITHASH=%s' % (CPPFLAGS, GIT_HASH)
|
||||
CXXFLAGS = '%s -std=c++17' % CXXFLAGS
|
||||
CXXFLAGS = '%s -std=c++20' % CXXFLAGS
|
||||
CXXFLAGS = '%s -fvisibility=hidden -fvisibility-inlines-hidden -c' % CXXFLAGS
|
||||
FPMATH = test_fpmath(CXX)
|
||||
CXXFLAGS = '%s %s' % (CXXFLAGS, FPMATH_FLAGS)
|
||||
|
@ -2699,7 +2699,7 @@ def mk_config():
|
|||
config.write('CC=%s\n' % CC)
|
||||
config.write('CXX=%s\n' % CXX)
|
||||
config.write('CXXFLAGS=%s %s\n' % (CPPFLAGS, CXXFLAGS))
|
||||
config.write('CFLAGS=%s %s\n' % (CPPFLAGS, CXXFLAGS.replace('-std=c++17', '')))
|
||||
config.write('CFLAGS=%s %s\n' % (CPPFLAGS, CXXFLAGS.replace('-std=c++20', '')))
|
||||
config.write('EXAMP_DEBUG_FLAG=%s\n' % EXAMP_DEBUG_FLAG)
|
||||
config.write('CXX_OUT_FLAG=-o \n')
|
||||
config.write('C_OUT_FLAG=-o \n')
|
||||
|
|
|
@ -375,10 +375,11 @@ def cp_into_bin(arch):
|
|||
os.path.join(bin_dir, "libz3.lib"))
|
||||
shutil.rmtree(lib_dir)
|
||||
if JAVA_ENABLED:
|
||||
java_dir = get_java_dist_path(arch)
|
||||
shutil.copytree(java_dir,
|
||||
bin_dir,
|
||||
dirs_exist_ok=True)
|
||||
java_dir = os.path.join(bin_dir, "java")
|
||||
for file in os.listdir(java_dir):
|
||||
src_path = os.path.join(java_dir, file)
|
||||
dst_path = os.path.join(bin_dir, file)
|
||||
shutil.copy2(src_path, dst_path)
|
||||
shutil.rmtree(java_dir)
|
||||
|
||||
def cp_pdb(arch):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
variables:
|
||||
Major: '4'
|
||||
Minor: '13'
|
||||
Patch: '1'
|
||||
Patch: '3'
|
||||
ReleaseVersion: $(Major).$(Minor).$(Patch)
|
||||
AssemblyVersion: $(Major).$(Minor).$(Patch).$(Build.BuildId)
|
||||
NightlyVersion: $(AssemblyVersion)-$(Build.buildId)
|
||||
|
@ -10,7 +10,7 @@ stages:
|
|||
- stage: Build
|
||||
jobs:
|
||||
- job: MacBuild
|
||||
displayName: "macOS Build"
|
||||
displayName: "Mac Build"
|
||||
pool:
|
||||
vmImage: "macOS-latest"
|
||||
steps:
|
||||
|
@ -35,7 +35,7 @@ stages:
|
|||
targetFolder: $(Build.ArtifactStagingDirectory)
|
||||
- task: PublishPipelineArtifact@0
|
||||
inputs:
|
||||
artifactName: 'macOSBuild'
|
||||
artifactName: 'macOsBuild'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- job: MacBuildArm64
|
||||
|
@ -80,35 +80,6 @@ stages:
|
|||
artifactName: 'UbuntuBuild'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- job: UbuntuBuild20
|
||||
displayName: "Ubuntu build 20"
|
||||
pool:
|
||||
vmImage: "ubuntu-20.04"
|
||||
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: 'UbuntuBuild20'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- job: UbuntuArm64
|
||||
displayName: "Ubuntu ARM64 build"
|
||||
pool:
|
||||
|
@ -121,7 +92,7 @@ stages:
|
|||
- 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 --nojava --arch=arm64
|
||||
- script: python scripts/mk_unix_dist.py --nodotnet --arch=arm64
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
sourceFolder: dist
|
||||
|
@ -167,74 +138,59 @@ stages:
|
|||
inputs:
|
||||
artifactName: 'UbuntuDoc'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- job: LinuxBuilds
|
||||
displayName: "ManyLinux build"
|
||||
variables:
|
||||
name: ManyLinux
|
||||
python: "/opt/python/cp37-cp37m/bin/python"
|
||||
# TODO copy artifacts
|
||||
|
||||
- job: "ManylinuxPythonBuildAmd64"
|
||||
displayName: "Python bindings (manylinux Centos AMD64) build"
|
||||
pool:
|
||||
vmImage: "ubuntu-latest"
|
||||
container: "quay.io/pypa/manylinux_2_28_x86_64:latest"
|
||||
container: "quay.io/pypa/manylinux2014_x86_64:latest"
|
||||
steps:
|
||||
- task: PythonScript@0
|
||||
displayName: Build
|
||||
inputs:
|
||||
scriptSource: 'filepath'
|
||||
scriptPath: scripts/mk_unix_dist.py
|
||||
arguments: --nodotnet --nojava
|
||||
pythonInterpreter: $(python)
|
||||
- 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
|
||||
pythonInterpreter: $(python)
|
||||
- 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: dist
|
||||
contents: '*.zip'
|
||||
sourceFolder: src/api/python/wheelhouse
|
||||
contents: '*.whl'
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
||||
- task: PublishPipelineArtifact@0
|
||||
inputs:
|
||||
artifactName: 'ManyLinuxBuild'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- job: LinuxBuildsArm64
|
||||
displayName: "ManyLinux ARM64 build"
|
||||
artifactName: 'ManyLinuxPythonBuildAMD64'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- job: ManyLinuxPythonBuildArm64
|
||||
displayName: "Python bindings (manylinux Centos ARM64 cross) build"
|
||||
variables:
|
||||
name: ManyLinux
|
||||
python: "/opt/python/cp37-cp37m/bin/python"
|
||||
pool:
|
||||
vmImage: "ubuntu-latest"
|
||||
container: "quay.io/pypa/manylinux_2_28_x86_64: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/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu.tar.xz?rev=33c6e30e5ac64e6dba8f0431f2c35f1b&hash=9918A05BF47621B632C7A5C8D2BB438FB80A4480'
|
||||
- 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 /tmp/arm-toolchain/bin/aarch64-none-linux-gnu-gcc
|
||||
- task: PythonScript@0
|
||||
displayName: Build
|
||||
inputs:
|
||||
scriptSource: 'filepath'
|
||||
scriptPath: scripts/mk_unix_dist.py
|
||||
arguments: --nodotnet --nojava --arch=arm64
|
||||
pythonInterpreter: $(python)
|
||||
- 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: dist
|
||||
contents: '*.zip'
|
||||
sourceFolder: src/api/python/wheelhouse
|
||||
contents: '*.whl'
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
||||
- task: PublishPipelineArtifact@0
|
||||
inputs:
|
||||
artifactName: 'ManyLinuxBuildArm64'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
artifactName: 'ManyLinuxPythonBuildArm64'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
|
||||
- template: build-win-signed.yml
|
||||
parameters:
|
||||
|
@ -271,9 +227,9 @@ stages:
|
|||
artifact: 'WindowsBuild-x64'
|
||||
path: $(Agent.TempDirectory)\package
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download Ubuntu 20.04 Build'
|
||||
displayName: 'Download Ubuntu Build'
|
||||
inputs:
|
||||
artifact: 'UbuntuBuild20'
|
||||
artifact: 'UbuntuBuild'
|
||||
path: $(Agent.TempDirectory)\package
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download Ubuntu ARM64 Build'
|
||||
|
@ -425,6 +381,7 @@ stages:
|
|||
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: EsrpCodeSigning@2
|
||||
condition: eq(1,0)
|
||||
continueOnError: true
|
||||
displayName: 'Sign Package'
|
||||
inputs:
|
||||
|
@ -453,6 +410,7 @@ stages:
|
|||
MaxConcurrency: '50'
|
||||
MaxRetryAttempts: '5'
|
||||
- task: EsrpCodeSigning@2
|
||||
condition: eq(1,0)
|
||||
continueOnError: true
|
||||
displayName: 'Sign Symbol Package'
|
||||
inputs:
|
||||
|
@ -492,46 +450,49 @@ stages:
|
|||
vmImage: "ubuntu-latest"
|
||||
steps:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifactName: 'WindowsBuild-x86'
|
||||
targetPath: $(Agent.TempDirectory)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifactName: 'WindowsBuild-x64'
|
||||
targetPath: $(Agent.TempDirectory)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifactName: 'ManyLinuxBuild'
|
||||
targetPath: $(Agent.TempDirectory)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifactName: 'ManyLinuxBuildArm64'
|
||||
targetPath: $(Agent.TempDirectory)
|
||||
- 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 libc-x64-bin; cd libc-x64-bin; unzip ../*x64-glibc*.zip
|
||||
- script: cd $(Agent.TempDirectory); mkdir libc-arm64-bin; cd libc-arm64-bin; unzip ../*arm64-glibc*.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 wheel
|
||||
- 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)/libc-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)/libc-arm64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
|
||||
# - 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'
|
||||
|
@ -577,9 +538,9 @@ stages:
|
|||
artifactName: 'UbuntuArm64'
|
||||
targetPath: tmp
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: "Download Ubuntu-20.04"
|
||||
displayName: "Download Ubuntu"
|
||||
inputs:
|
||||
artifactName: 'UbuntuBuild20'
|
||||
artifactName: 'UbuntuBuild'
|
||||
targetPath: tmp
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: "Download Doc"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
trigger: none
|
||||
|
||||
variables:
|
||||
ReleaseVersion: '4.13.1'
|
||||
ReleaseVersion: '4.13.3'
|
||||
|
||||
stages:
|
||||
|
||||
|
@ -15,9 +15,9 @@ stages:
|
|||
jobs:
|
||||
|
||||
- job: MacBuild
|
||||
displayName: "macOS Build"
|
||||
displayName: "Mac Build"
|
||||
pool:
|
||||
vmImage: "macOS-11"
|
||||
vmImage: "macOS-latest"
|
||||
steps:
|
||||
- task: PythonScript@0
|
||||
displayName: Build
|
||||
|
@ -40,13 +40,13 @@ stages:
|
|||
targetFolder: $(Build.ArtifactStagingDirectory)
|
||||
- task: PublishPipelineArtifact@0
|
||||
inputs:
|
||||
artifactName: 'macOSBuild'
|
||||
artifactName: 'macOsBuild'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- job: MacBuildArm64
|
||||
displayName: "macOS ARM64 Build"
|
||||
displayName: "Mac ARM64 Build"
|
||||
pool:
|
||||
vmImage: "macOS-11"
|
||||
vmImage: "macOS-latest"
|
||||
steps:
|
||||
- script: python scripts/mk_unix_dist.py --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk --arch=arm64 --os=osx-11.0
|
||||
- script: git clone https://github.com/z3prover/z3test z3test
|
||||
|
@ -85,41 +85,13 @@ stages:
|
|||
artifactName: 'UbuntuBuild'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- job: UbuntuBuild20
|
||||
displayName: "Ubuntu build 20"
|
||||
pool:
|
||||
vmImage: "ubuntu-20.04"
|
||||
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: 'UbuntuBuild20'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- job: UbuntuArm64
|
||||
displayName: "Ubuntu ARM64 build"
|
||||
pool:
|
||||
vmImage: "ubuntu-latest"
|
||||
steps:
|
||||
- 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'
|
||||
- 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'
|
||||
- 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'
|
||||
|
@ -173,43 +145,29 @@ stages:
|
|||
artifactName: 'UbuntuDoc'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- job: LinuxBuilds
|
||||
displayName: "ManyLinux build"
|
||||
variables:
|
||||
name: ManyLinux
|
||||
python: "/opt/python/cp37-cp37m/bin/python"
|
||||
- job: "ManylinuxPythonBuildAmd64"
|
||||
displayName: "Python bindings (manylinux Centos AMD64) build"
|
||||
pool:
|
||||
vmImage: "ubuntu-latest"
|
||||
container: "quay.io/pypa/manylinux2014_x86_64:latest"
|
||||
steps:
|
||||
- task: PythonScript@0
|
||||
displayName: Build
|
||||
inputs:
|
||||
scriptSource: 'filepath'
|
||||
scriptPath: scripts/mk_unix_dist.py
|
||||
arguments: --nodotnet --nojava
|
||||
pythonInterpreter: $(python)
|
||||
- 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
|
||||
pythonInterpreter: $(python)
|
||||
- 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: dist
|
||||
contents: '*.zip'
|
||||
sourceFolder: src/api/python/wheelhouse
|
||||
contents: '*.whl'
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
||||
- task: PublishPipelineArtifact@0
|
||||
inputs:
|
||||
artifactName: 'ManyLinuxBuild'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- job: LinuxBuildsArm64
|
||||
displayName: "ManyLinux ARM64 build"
|
||||
artifactName: 'ManyLinuxPythonBuildAMD64'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- job: ManyLinuxPythonBuildArm64
|
||||
displayName: "Python bindings (manylinux Centos ARM64 cross) build"
|
||||
variables:
|
||||
name: ManyLinux
|
||||
python: "/opt/python/cp37-cp37m/bin/python"
|
||||
|
@ -220,26 +178,24 @@ stages:
|
|||
- 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'
|
||||
- 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 /tmp/arm-toolchain/bin/aarch64-none-linux-gnu-gcc
|
||||
- task: PythonScript@0
|
||||
displayName: Build
|
||||
inputs:
|
||||
scriptSource: 'filepath'
|
||||
scriptPath: scripts/mk_unix_dist.py
|
||||
arguments: --nodotnet --nojava --arch=arm64
|
||||
pythonInterpreter: $(python)
|
||||
- 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: dist
|
||||
contents: '*.zip'
|
||||
sourceFolder: src/api/python/wheelhouse
|
||||
contents: '*.whl'
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
||||
- task: PublishPipelineArtifact@0
|
||||
inputs:
|
||||
artifactName: 'ManyLinuxBuildArm64'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
artifactName: 'ManyLinuxPythonBuildArm64'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
|
||||
- template: build-win-signed.yml
|
||||
parameters:
|
||||
|
@ -283,11 +239,6 @@ stages:
|
|||
inputs:
|
||||
artifact: 'UbuntuBuild'
|
||||
path: $(Agent.TempDirectory)\package
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download Ubuntu20 Build'
|
||||
inputs:
|
||||
artifact: 'UbuntuBuild20'
|
||||
path: $(Agent.TempDirectory)\package
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download Ubuntu ARM64 Build'
|
||||
inputs:
|
||||
|
@ -296,8 +247,14 @@ stages:
|
|||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download macOS Build'
|
||||
inputs:
|
||||
artifact: 'macOSBuild'
|
||||
artifact: 'macOsBuild'
|
||||
path: $(Agent.TempDirectory)\package
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download macOS Arm64 Build'
|
||||
inputs:
|
||||
artifact: 'MacArm64'
|
||||
path: $(Agent.TempDirectory)\package
|
||||
|
||||
- task: NuGetToolInstaller@0
|
||||
inputs:
|
||||
versionSpec: 5.x
|
||||
|
@ -322,6 +279,8 @@ stages:
|
|||
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: EsrpCodeSigning@2
|
||||
condition: eq(1,0)
|
||||
continueOnError: true
|
||||
displayName: 'Sign Package'
|
||||
inputs:
|
||||
ConnectedServiceName: 'z3-esrp-signing-2'
|
||||
|
@ -350,6 +309,8 @@ stages:
|
|||
MaxRetryAttempts: '5'
|
||||
- task: EsrpCodeSigning@2
|
||||
displayName: 'Sign Symbol Package'
|
||||
condition: eq(1,0)
|
||||
continueOnError: true
|
||||
inputs:
|
||||
ConnectedServiceName: 'z3-esrp-signing-2'
|
||||
FolderPath: $(Build.ArtifactStagingDirectory)
|
||||
|
@ -421,6 +382,8 @@ stages:
|
|||
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: EsrpCodeSigning@2
|
||||
condition: eq(1,0)
|
||||
continueOnError: true
|
||||
displayName: 'Sign Package'
|
||||
inputs:
|
||||
ConnectedServiceName: 'z3-esrp-signing-2'
|
||||
|
@ -448,6 +411,8 @@ stages:
|
|||
MaxConcurrency: '50'
|
||||
MaxRetryAttempts: '5'
|
||||
- task: EsrpCodeSigning@2
|
||||
condition: eq(1,0)
|
||||
continueOnError: true
|
||||
displayName: 'Sign Symbol Package'
|
||||
inputs:
|
||||
ConnectedServiceName: 'z3-esrp-signing-2'
|
||||
|
@ -480,7 +445,7 @@ stages:
|
|||
artifactName: 'NuGet32'
|
||||
|
||||
|
||||
- job: PythonPackage
|
||||
- job: Python
|
||||
displayName: "Python packaging"
|
||||
pool:
|
||||
vmImage: "ubuntu-latest"
|
||||
|
@ -488,22 +453,12 @@ stages:
|
|||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download macOS Build'
|
||||
inputs:
|
||||
artifact: 'macOSBuild'
|
||||
artifact: 'macOsBuild'
|
||||
path: $(Agent.TempDirectory)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download macOS Arm64 Build'
|
||||
inputs:
|
||||
artifact: 'MacArm64'
|
||||
path: $(Agent.TempDirectory)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download ManyLinux Build'
|
||||
inputs:
|
||||
artifact: 'ManyLinuxBuild'
|
||||
path: $(Agent.TempDirectory)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download ManyLinux Arm64 Build'
|
||||
inputs:
|
||||
artifact: 'ManyLinuxBuildArm64'
|
||||
path: $(Agent.TempDirectory)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download Win32 Build'
|
||||
|
@ -514,22 +469,31 @@ stages:
|
|||
displayName: 'Download Win64 Build'
|
||||
inputs:
|
||||
artifact: 'WindowsBuild-x64'
|
||||
path: $(Agent.TempDirectory)
|
||||
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 libc-x64-bin; cd libc-x64-bin; unzip ../*x64-glibc*.zip
|
||||
- script: cd $(Agent.TempDirectory); mkdir libc-arm64-bin; cd libc-arm64-bin; unzip ../*arm64-glibc*.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 wheel
|
||||
- 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)/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: cd src/api/python; echo $(Agent.TempDirectory)/libc-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)/libc-arm64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
|
||||
# - 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'
|
||||
|
@ -545,11 +509,6 @@ stages:
|
|||
pool:
|
||||
vmImage: "windows-latest"
|
||||
steps:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download Ubuntu Build'
|
||||
inputs:
|
||||
artifact: 'UbuntuBuild20'
|
||||
path: $(Agent.TempDirectory)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download Ubuntu Build'
|
||||
inputs:
|
||||
|
@ -568,7 +527,7 @@ stages:
|
|||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download macOS Build'
|
||||
inputs:
|
||||
artifact: 'macOSBuild'
|
||||
artifact: 'macOsBuild'
|
||||
path: $(Agent.TempDirectory)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download macOSArm64 Build'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue