mirror of
https://github.com/Z3Prover/z3
synced 2025-06-10 08:03:25 +00:00
sym file
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
021bd8a994
commit
010d578e8f
2 changed files with 15 additions and 10 deletions
|
@ -54,26 +54,27 @@ def unpack(packages, symbols):
|
||||||
# +- debian.8-x64
|
# +- debian.8-x64
|
||||||
# +- macos
|
# +- macos
|
||||||
# +
|
# +
|
||||||
|
tmp = "tmp" if not symbols else "tmpsym"
|
||||||
for f in os.listdir(packages):
|
for f in os.listdir(packages):
|
||||||
print(f)
|
print(f)
|
||||||
if f.endswith(".zip") and classify_package(f):
|
if f.endswith(".zip") and classify_package(f):
|
||||||
os_name, package_dir, ext, dst = classify_package(f)
|
os_name, package_dir, ext, dst = classify_package(f)
|
||||||
path = os.path.abspath(os.path.join(packages, f))
|
path = os.path.abspath(os.path.join(packages, f))
|
||||||
zip_ref = zipfile.ZipFile(path, 'r')
|
zip_ref = zipfile.ZipFile(path, 'r')
|
||||||
zip_ref.extract(f"{package_dir}/bin/libz3.{ext}", "tmp")
|
zip_ref.extract(f"{package_dir}/bin/libz3.{ext}", f"{tmp}")
|
||||||
mk_dir(f"out/runtimes/{dst}/native")
|
mk_dir(f"out/runtimes/{dst}/native")
|
||||||
replace(f"tmp/{package_dir}/bin/libz3.{ext}", f"out/runtimes/{dst}/native/libz3.{ext}")
|
replace(f"{tmp}/{package_dir}/bin/libz3.{ext}", f"out/runtimes/{dst}/native/libz3.{ext}")
|
||||||
if "x64-win" in f:
|
if "x64-win" in f:
|
||||||
mk_dir("out/lib/netstandard1.4/")
|
mk_dir("out/lib/netstandard1.4/")
|
||||||
if symbols:
|
if symbols:
|
||||||
zip_ref.extract(f"{package_dir}/bin/libz3.pdb", "tmp")
|
zip_ref.extract(f"{package_dir}/bin/libz3.pdb", f"{tmp}")
|
||||||
replace(f"tmp/{package_dir}/bin/libz3.pdb", f"out/runtimes/{dst}/native/libz3.pdb")
|
replace(f"{tmp}/{package_dir}/bin/libz3.pdb", f"out/runtimes/{dst}/native/libz3.pdb")
|
||||||
files = ["Microsoft.Z3.dll"]
|
files = ["Microsoft.Z3.dll"]
|
||||||
if symbols:
|
if symbols:
|
||||||
files += ["Microsoft.Z3.pdb"]
|
files += ["Microsoft.Z3.pdb"]
|
||||||
for b in files:
|
for b in files:
|
||||||
zip_ref.extract(f"{package_dir}/bin/{b}", "tmp")
|
zip_ref.extract(f"{package_dir}/bin/{b}", f"{tmp}")
|
||||||
replace(f"tmp/{package_dir}/bin/{b}", f"out/lib/netstandard1.4/{b}")
|
replace(f"{tmp}/{package_dir}/bin/{b}", f"out/lib/netstandard1.4/{b}")
|
||||||
|
|
||||||
def mk_targets(source_root):
|
def mk_targets(source_root):
|
||||||
mk_dir("out/build")
|
mk_dir("out/build")
|
||||||
|
@ -111,9 +112,7 @@ Linux Dependencies:
|
||||||
</metadata>
|
</metadata>
|
||||||
</package>""".format(version, repo, branch, commit)
|
</package>""".format(version, repo, branch, commit)
|
||||||
print(contents)
|
print(contents)
|
||||||
sym = ""
|
sym = "sym." if symbols else ""
|
||||||
if symbols:
|
|
||||||
sym = "sym."
|
|
||||||
file = f"out/Microsoft.Z3.x64.{sym}nuspec"
|
file = f"out/Microsoft.Z3.x64.{sym}nuspec"
|
||||||
print(file)
|
print(file)
|
||||||
with open(file, 'w') as f:
|
with open(file, 'w') as f:
|
||||||
|
@ -131,7 +130,6 @@ def main():
|
||||||
print(sys.argv[7])
|
print(sys.argv[7])
|
||||||
if len(sys.argv) > 7 and "symbols" == sys.argv[7]:
|
if len(sys.argv) > 7 and "symbols" == sys.argv[7]:
|
||||||
symbols = True
|
symbols = True
|
||||||
print(symbols)
|
|
||||||
print(packages)
|
print(packages)
|
||||||
mk_dir(packages)
|
mk_dir(packages)
|
||||||
unpack(packages, symbols)
|
unpack(packages, symbols)
|
||||||
|
|
|
@ -222,30 +222,37 @@ stages:
|
||||||
displayName: "Deploy into GitHub"
|
displayName: "Deploy into GitHub"
|
||||||
steps:
|
steps:
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: "Download windows32"
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: 'Windows32'
|
artifactName: 'Windows32'
|
||||||
targetPath: tmp
|
targetPath: tmp
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: "Download windows64"
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: 'Windows64'
|
artifactName: 'Windows64'
|
||||||
targetPath: tmp
|
targetPath: tmp
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: "Download Mac"
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: 'Mac'
|
artifactName: 'Mac'
|
||||||
targetPath: tmp
|
targetPath: tmp
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: "Download Ubuntu"
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: 'Ubuntu'
|
artifactName: 'Ubuntu'
|
||||||
targetPath: tmp
|
targetPath: tmp
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: "Download Python"
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: 'Python packages'
|
artifactName: 'Python packages'
|
||||||
targetPath: tmp
|
targetPath: tmp
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: "Download NuGet"
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: 'NuGet'
|
artifactName: 'NuGet'
|
||||||
targetPath: tmp
|
targetPath: tmp
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: "Download SNuGet - with symbols"
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: 'SNuGet'
|
artifactName: 'SNuGet'
|
||||||
targetPath: tmp
|
targetPath: tmp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue