[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
This commit is contained in:
parent
a144daf034
commit
cfced58c1c
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@ -245,7 +245,7 @@ def BuildCUDA(args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def BuildJVMPackagesWithCUDA(args) {
|
def BuildJVMPackagesWithCUDA(args) {
|
||||||
node('linux && gpu') {
|
node('linux && mgpu') {
|
||||||
unstash name: 'srcs'
|
unstash name: 'srcs'
|
||||||
echo "Build XGBoost4J-Spark with Spark ${args.spark_version}, CUDA ${args.cuda_version}"
|
echo "Build XGBoost4J-Spark with Spark ${args.spark_version}, CUDA ${args.cuda_version}"
|
||||||
def container_type = "jvm_gpu_build"
|
def container_type = "jvm_gpu_build"
|
||||||
@ -440,10 +440,11 @@ def DeployJVMPackages(args) {
|
|||||||
unstash name: 'srcs'
|
unstash name: 'srcs'
|
||||||
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('release')) {
|
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('release')) {
|
||||||
echo 'Deploying to xgboost-maven-repo S3 repo...'
|
echo 'Deploying to xgboost-maven-repo S3 repo...'
|
||||||
def container_type = "jvm"
|
|
||||||
def docker_binary = "docker"
|
|
||||||
sh """
|
sh """
|
||||||
${dockerRun} ${container_type} ${docker_binary} tests/ci_build/deploy_jvm_packages.sh ${args.spark_version}
|
${dockerRun} jvm docker tests/ci_build/deploy_jvm_packages.sh ${args.spark_version} 0
|
||||||
|
"""
|
||||||
|
sh """
|
||||||
|
${dockerRun} jvm_gpu_build docker --build-arg CUDA_VERSION=10.0 tests/ci_build/deploy_jvm_packages.sh ${args.spark_version} 1
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
deleteDir()
|
deleteDir()
|
||||||
|
|||||||
@ -3,22 +3,32 @@
|
|||||||
set -e
|
set -e
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -ne 2 ]; then
|
||||||
echo "Usage: $0 [spark version]"
|
echo "Usage: $0 [spark version] [build_gpu? 0 or 1]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
spark_version=$1
|
spark_version=$1
|
||||||
|
build_gpu=$2
|
||||||
|
|
||||||
# Initialize local Maven repository
|
# Initialize local Maven repository
|
||||||
./tests/ci_build/initialize_maven.sh
|
./tests/ci_build/initialize_maven.sh
|
||||||
|
|
||||||
rm -rf build/
|
|
||||||
cd jvm-packages
|
cd jvm-packages
|
||||||
|
rm -rf $(find . -name target)
|
||||||
|
rm -rf ../build/
|
||||||
|
|
||||||
# Re-build package without Mock Rabit
|
# Re-build package without Mock Rabit
|
||||||
# Deploy to S3 bucket xgboost-maven-repo
|
# 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
|
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 +x
|
||||||
set +e
|
set +e
|
||||||
|
|||||||
@ -124,6 +124,8 @@ eval[test] = {data_path}
|
|||||||
v = xgboost.__version__
|
v = xgboost.__version__
|
||||||
if v.find('SNAPSHOT') != -1:
|
if v.find('SNAPSHOT') != -1:
|
||||||
assert msg.split(':')[1].strip() == v.split('-')[0]
|
assert msg.split(':')[1].strip() == v.split('-')[0]
|
||||||
|
elif v.find('rc') != -1:
|
||||||
|
assert msg.split(':')[1].strip() == v.split('rc')[0]
|
||||||
else:
|
else:
|
||||||
assert msg.split(':')[1].strip() == v
|
assert msg.split(':')[1].strip() == v
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user