xgboost/tests/ci_build/deploy_jvm_packages.sh
Philip Hyunsu Cho cfced58c1c
[CI] Port CI fixes from the 1.2.0 branch (#6050)
* Fix a unit test on CLI, to handle RC versions

* [CI] Use mgpu machine to run gpu hist unit tests

* [CI] Build GPU-enabled JAR artifact and deploy to xgboost-maven-repo
2020-08-22 23:24:46 -07:00

35 lines
826 B
Bash
Executable File

#!/bin/bash
set -e
set -x
if [ $# -ne 2 ]; then
echo "Usage: $0 [spark version] [build_gpu? 0 or 1]"
exit 1
fi
spark_version=$1
build_gpu=$2
# Initialize local Maven repository
./tests/ci_build/initialize_maven.sh
cd jvm-packages
rm -rf $(find . -name target)
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
set +x
set +e