variables: Major: '4' Minor: '13' Patch: '4' ReleaseVersion: $(Major).$(Minor).$(Patch) AssemblyVersion: $(Major).$(Minor).$(Patch).$(Build.BuildId) NightlyVersion: $(AssemblyVersion)-$(Build.buildId) stages: - stage: Build jobs: - job: MacBuild displayName: "Mac Build" 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" 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" 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: 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" 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" 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 -