Skip to content

Commit

Permalink
#380: rewrite Maven publication step to support x64 and arm64 archite…
Browse files Browse the repository at this point in the history
…cture.

Additionally, we upload Java sources and JavaDoc for z3 to the Maven repository.

We need to test whether the uploaded files work as expected.
  • Loading branch information
kfriedberger committed Sep 29, 2024
1 parent 0161a6e commit b5be60c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
27 changes: 21 additions & 6 deletions build/build-maven-publish.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,31 @@ SPDX-License-Identifier: Apache-2.0
<ivy:artifactproperty name="[artifact].revision" value="[revision]"/>
<property name="stage.solver" value="z3"/>
<property name="stage.revision" value="${com.microsoft.z3.revision}"/>
<property name="libDir.x64" value="lib/java-contrib/x64"/>
<property name="libDir.arm64" value="lib/java-contrib/arm64"/>
<!-- prepare the pom-file -->
<generate-solver-pom-file/>
<!-- then publish the files -->
<!-- common Java files -->
<stage-solver-file filename="com.microsoft.z3" fileending="jar"/>
<stage-solver-file filename="libz3java" classifier="libz3java" fileending="so"/>
<stage-solver-file filename="libz3java" classifier="libz3java" fileending="dll"/>
<stage-solver-file filename="libz3java" classifier="libz3java" fileending="dylib"/>
<stage-solver-file filename="libz3" classifier="libz3" fileending="so"/>
<stage-solver-file filename="libz3" classifier="libz3" fileending="dll"/>
<stage-solver-file filename="libz3" classifier="libz3" fileending="dylib"/>
<stage-solver-file filename="com.microsoft.z3-sources" fileending="jar" classifier="sources" filedirectory="lib/java-contrib"/>
<stage-solver-file filename="com.microsoft.z3-javadoc" fileending="jar" classifier="javadoc" filedirectory="lib/java-contrib"/>
<!-- for x64 arch -->
<stage-solver-file filename="libz3java" classifier="libz3java-x64" filedirectory="${libDir.x64}" fileending="so"/>
<stage-solver-file filename="libz3java" classifier="libz3java-x64" filedirectory="${libDir.x64}" fileending="dll"/>
<stage-solver-file filename="libz3java" classifier="libz3java-x64" filedirectory="${libDir.x64}" fileending="dylib"/>
<stage-solver-file filename="libz3" classifier="libz3-x64" filedirectory="${libDir.x64}" fileending="so"/>
<stage-solver-file filename="libz3" classifier="libz3-x64" filedirectory="${libDir.x64}" fileending="dll"/>
<stage-solver-file filename="libz3" classifier="libz3-x64" filedirectory="${libDir.x64}" fileending="dylib"/>
<!-- for arm64 arch -->
<!-- TODO: Z3 forgot to include Java bindings into its Linux-ARM64 release in 4.13.2,
so we ignore those files currently. See https://github.com/Z3Prover/z3/issues/7406 -->
<!-- <stage-solver-file filename="libz3java" classifier="libz3java-arm64" filedirectory="${libDir.arm64}" fileending="so"/> -->
<stage-solver-file filename="libz3java" classifier="libz3java-arm64" filedirectory="${libDir.arm64}" fileending="dll"/>
<stage-solver-file filename="libz3java" classifier="libz3java-arm64" filedirectory="${libDir.arm64}" fileending="dylib"/>
<!-- <stage-solver-file filename="libz3" classifier="libz3-arm64" filedirectory="${libDir.arm64}" fileending="so"/> -->
<stage-solver-file filename="libz3" classifier="libz3-arm64" filedirectory="${libDir.arm64}" fileending="dll"/>
<stage-solver-file filename="libz3" classifier="libz3-arm64" filedirectory="${libDir.arm64}" fileending="dylib"/>
</target>

<target name="stage-bitwuzla" depends="build-dependencies, install-contrib"
Expand Down
2 changes: 1 addition & 1 deletion lib/ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ SPDX-License-Identifier: Apache-2.0

<!-- Solver Binaries -->
<dependency org="org.sosy_lab" name="javasmt-solver-mathsat" rev="5.6.10" conf="runtime-mathsat->solver-mathsat" />
<dependency org="org.sosy_lab" name="javasmt-solver-z3" rev="4.13.0" conf="runtime-z3->solver-z3; contrib->sources,javadoc" />
<dependency org="org.sosy_lab" name="javasmt-solver-z3" rev="4.13.0" conf="runtime-z3->solver-z3; contrib->sources,javadoc,solver-z3-x64,solver-z3-arm64" />
<dependency org="org.sosy_lab" name="javasmt-solver-opensmt" rev="2.6.0-g2f72cc0e" conf="runtime-opensmt->solver-opensmt; contrib->sources,javadoc" />
<dependency org="org.sosy_lab" name="javasmt-solver-optimathsat" rev="1.7.1-sosy0" conf="runtime-optimathsat->solver-optimathsat" />
<dependency org="org.sosy_lab" name="javasmt-solver-cvc4" rev="1.8-prerelease-2020-06-24-g7825d8f28" conf="runtime-cvc4->solver-cvc4" />
Expand Down

0 comments on commit b5be60c

Please sign in to comment.