diff --git a/bindings/java/pom.xml.in b/bindings/java/pom.xml.in index 1052d5aaac76..ac4f2fbb9218 100644 --- a/bindings/java/pom.xml.in +++ b/bindings/java/pom.xml.in @@ -7,7 +7,7 @@ 4.0.0 org.openucx jucx - @VERSION@ + @VERSION@-SNAPSHOT jar jucx https://github.com/openucx/ucx diff --git a/bindings/java/src/main/native/Makefile.am b/bindings/java/src/main/native/Makefile.am index 09b0ffa9e708..c3fb8fc41a30 100644 --- a/bindings/java/src/main/native/Makefile.am +++ b/bindings/java/src/main/native/Makefile.am @@ -55,11 +55,6 @@ libjucx_la_SOURCES = context.cc \ libjucx_la_CXXFLAGS = -fPIC -DPIC -Werror -libjucx_la_LIBADD = $(topdir)/src/ucs/libucs.la \ - $(topdir)/src/uct/libuct.la \ - $(topdir)/src/ucm/libucm.la \ - $(topdir)/src/ucp/libucp.la - libjucx_la_DEPENDENCIES = Makefile.am Makefile.in Makefile # Compile Java source code and pack to jar @@ -74,6 +69,10 @@ install-data-hook: package clean-local: -rm -rf $(java_build_dir) +# Publish JUCX jar to maven central +publish: + $(MVNCMD) deploy -DskipTests + test: $(MVNCMD) test -DargLine="-XX:OnError='cat hs_err_pid%p.log'" docs: diff --git a/buildlib/azure-pipelines-release.yml b/buildlib/azure-pipelines-release.yml index 9ade13a2ddff..59267785b602 100644 --- a/buildlib/azure-pipelines-release.yml +++ b/buildlib/azure-pipelines-release.yml @@ -22,13 +22,23 @@ stages: - bash: ./autogen.sh displayName: Setup autotools + - bash: sed -i -e 's/@VERSION@-SNAPSHOT/@VERSION@/g' bindings/java/pom.xml.in + displayName: Set JUCX release version + - bash: | set -eE gcc --version - ./contrib/configure-release + ./contrib/configure-release --with-java ./contrib/buildrpm.sh -s -t -b displayName: Build tarball + - bash: | + set -eE + gcc --version + make -C bindings/java/src/main/native/Makefile + make -C bindings/java/src/main/native/Makefile publish + displayName: Make and publish JUCX release jar + - task: GithubRelease@0 displayName: Create/edit GitHub Draft Release inputs: diff --git a/buildlib/azure-pipelines.yml b/buildlib/azure-pipelines.yml index ef6343a3bf77..05f65681b09a 100644 --- a/buildlib/azure-pipelines.yml +++ b/buildlib/azure-pipelines.yml @@ -135,6 +135,22 @@ stages: ./contrib/buildrpm.sh -s -t -b displayName: Build tarball + # Test RPM build + - job: publish_jucx + displayName: Publish JUCX SNAPSHOT artifact to maven central + container: fedora + steps: + - bash: ./autogen.sh + displayName: Setup autotools + + - bash: | + set -eE + gcc --version + ./contrib/configure-release --with-java + make -C bindings/java/src/main/native/ + make -C bindings/java/src/main/native/ publish + displayName: Make and publish JUCX jar + - stage: Tests dependsOn: [Codestyle] jobs: