Skip to content

Commit

Permalink
JUCX: publish SNAPHOT and RELEASE jars to maven cental.
Browse files Browse the repository at this point in the history
  • Loading branch information
petro-rudenko committed Jan 13, 2020
1 parent 373bd29 commit aaa24c1
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 15 deletions.
11 changes: 2 additions & 9 deletions bindings/java/pom.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.openucx</groupId>
<artifactId>jucx</artifactId>
<version>@VERSION@</version>
<version>@VERSION@-SNAPSHOT</version>
<packaging>jar</packaging>
<name>jucx</name>
<url>https://github.com/openucx/ucx</url>
Expand Down Expand Up @@ -45,7 +45,6 @@
<ucs.lib.path>${ucx.build.dir}/src/ucs/.libs</ucs.lib.path>
<uct.lib.path>${ucx.build.dir}/src/uct/.libs</uct.lib.path>
<ucp.lib.path>${ucx.build.dir}/src/ucp/.libs</ucp.lib.path>
<ucx.inst.dir>@(DESTDIR)@/@libdir@</ucx.inst.dir>
<junit.version>4.12</junit.version>
<sources>**/jucx/**</sources>
<skipCopy>false</skipCopy>
Expand Down Expand Up @@ -105,7 +104,7 @@
<resource>
<directory>resources</directory>
<includes>
<include>**/*</include>
<include>libjucx.so</include>
</includes>
</resource>
</resources>
Expand Down Expand Up @@ -193,12 +192,6 @@
<skip>${skipCopy}</skip>
<outputDirectory>${basedir}/resources</outputDirectory>
<resources>
<resource>
<directory>${ucx.inst.dir}</directory>
<includes>
<include>**/*.so</include>
</includes>
</resource>
<resource>
<directory>${native.dir}/.libs</directory>
<includes>
Expand Down
7 changes: 5 additions & 2 deletions bindings/java/src/main/native/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if HAVE_JAVA
jardir = $(libdir)
topdir = $(abs_top_builddir)
java_build_dir = $(builddir)/build-java
jarfile = $(java_build_dir)/jucx-@[email protected]
jarfile = $(java_build_dir)/jucx-@VERSION@-SNAPSHOT.jar
javadir = $(top_srcdir)/bindings/java

MVNCMD = $(MVN) -B -T 1C -f \
Expand Down Expand Up @@ -81,11 +81,14 @@ package : $(jarfile)

# Maven install phase
jar_DATA = $(jarfile)

# Remove all compiled Java files
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:
Expand Down
15 changes: 14 additions & 1 deletion buildlib/azure-pipelines-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,26 @@ stages:
- bash: ./autogen.sh
displayName: Setup autotools

- bash: |
sed -i -e 's/@VERSION@-SNAPSHOT/@VERSION@/g' bindings/java/pom.xml.in
sed -i -e 's/@VERSION@-SNAPSHOT/@VERSION@/g' bindings/java/src/main/native/Makefile.am
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
./contrib/configure-release-mt --with-java
make -j `nproc`
make -C bindings/java/src/main/native/ publish
displayName: Make and publish JUCX release jar
- task: GithubRelease@0
displayName: Create/edit GitHub Draft Release
inputs:
Expand Down
2 changes: 1 addition & 1 deletion buildlib/azure-pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The local container can be entered and checked out using a command sequence
similar to:

```shell
$ cd ..../ucx
$ cd ../../ucx
$ docker run --rm -ti -v `pwd`:`pwd` -w `pwd` ucfconsort.azurecr.io/ucx/centos7:1 /bin/bash
# mkdir build-centos7 && cd build-centos7
# ../configure
Expand Down
16 changes: 16 additions & 0 deletions buildlib/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,22 @@ stages:
./contrib/buildrpm.sh -s -t -b
displayName: Build tarball
# Publish JUCX to maven cental
- 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 -s -j `nproc`
make -C bindings/java/src/main/native/ publish
displayName: Make and publish JUCX jar
- stage: Tests
dependsOn: [Codestyle]
jobs:
Expand Down
4 changes: 2 additions & 2 deletions contrib/test_jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1194,14 +1194,14 @@ test_jucx() {

java -XX:ErrorFile=$WORKSPACE/hs_err_${BUILD_NUMBER}_%p.log \
-XX:OnError="cat $WORKSPACE/hs_err_${BUILD_NUMBER}_%p.log" \
-cp "bindings/java/src/main/native/build-java/*" \
-cp "bindings/java/resources/*:bindings/java/src/main/native/build-java/*" \
org.openucx.jucx.examples.UcxReadBWBenchmarkReceiver \
s=$server_ip p=$JUCX_TEST_PORT &
java_pid=$!
sleep 10
java -XX:ErrorFile=$WORKSPACE/hs_err_${BUILD_NUMBER}_%p.log \
-XX:OnError="cat $WORKSPACE/hs_err_${BUILD_NUMBER}_%p.log" \
-cp "bindings/java/src/main/native/build-java/*" \
-cp "bindings/java/resources/*:bindings/java/src/main/native/build-java/*" \
org.openucx.jucx.examples.UcxReadBWBenchmarkSender \
s=$server_ip p=$JUCX_TEST_PORT t=10000000
wait $java_pid
Expand Down

0 comments on commit aaa24c1

Please sign in to comment.