[jvm-packages] Fix up build for xgboost4j-gpu, xgboost4j-spark-gpu (#6216)

* [CI] Clean up build for JVM packages

* Use correct path for saving native lib

* Fix groupId of maven-surefire-plugin

* Fix stashing of xgboost4j_jar_gpu

* [CI] Don't run xgboost4j-tester with GPU, since it doesn't use gpu_hist
This commit is contained in:
Philip Hyunsu Cho
2020-10-09 14:08:15 -07:00
committed by GitHub
parent 70ce5216b5
commit c991eb612d
9 changed files with 82 additions and 93 deletions

View File

@@ -3,13 +3,12 @@
set -e
set -x
if [ $# -ne 2 ]; then
echo "Usage: $0 [spark version] [build_gpu? 0 or 1]"
if [ $# -ne 1 ]; then
echo "Usage: $0 [spark version]"
exit 1
fi
spark_version=$1
build_gpu=$2
# Initialize local Maven repository
./tests/ci_build/initialize_maven.sh
@@ -20,15 +19,7 @@ rm -rf ../build/
# Re-build package without Mock Rabit
# Deploy to S3 bucket xgboost-maven-repo
if [[ "$build_gpu" == "0" ]]
then
# Build CPU artifact
mvn --no-transfer-progress package deploy -P release-to-s3 -Dspark.version=${spark_version} -DskipTests
else
# Build GPU artifact
sed -i -e 's/<artifactId>xgboost\(.*\)_\(.*\)<\/artifactId>/<artifactId>xgboost\1-gpu_\2<\/artifactId>/' $(find . -name pom.xml)
mvn --no-transfer-progress package deploy -Duse.cuda=ON -P release-to-s3 -Dspark.version=${spark_version} -DskipTests
fi
mvn --no-transfer-progress package deploy -Duse.cuda=ON -P release-to-s3 -Dspark.version=${spark_version} -DskipTests
set +x
set +e