Skip to content

Commit

Permalink
Deploy CPU and GPU variants
Browse files Browse the repository at this point in the history
  • Loading branch information
hcho3 committed Nov 8, 2024
1 parent 0769351 commit 6d0f38b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 17 deletions.
6 changes: 3 additions & 3 deletions tests/buildkite/deploy-jvm-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ set -euo pipefail

source tests/buildkite/conftest.sh

if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]]
then
# if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]]
# then
echo "--- Deploy JVM packages to xgboost-maven-repo S3 repo"
tests/ci_build/ci_build.sh jvm_gpu_build \
--build-arg CUDA_VERSION_ARG=${CUDA_VERSION} \
--build-arg NCCL_VERSION_ARG=${NCCL_VERSION} \
tests/ci_build/deploy_jvm_packages.sh ${SPARK_VERSION}
fi
# fi
35 changes: 21 additions & 14 deletions tests/ci_build/deploy_jvm_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,28 @@ cd jvm-packages
rm -rf $(find . -name target)
rm -rf ../build/

# Re-build package
# Maven profiles:
# `default` includes modules: xgboost4j, xgboost4j-spark, xgboost4j-flink, xgboost4j-example
# `gpu` includes modules: xgboost4j-gpu, xgboost4j-spark-gpu, sets `use.cuda = ON`
# `scala-2.13` sets the scala binary version to the 2.13
# `release-to-s3` sets maven deployment targets

# Deploy to S3 bucket xgboost-maven-repo
mvn --no-transfer-progress package deploy -P default,gpu,release-to-s3 -Dspark.version=${spark_version} -DskipTests
# Deploy scala 2.13 to S3 bucket xgboost-maven-repo
cd ..
python dev/change_scala_version.py --scala-version 2.13 --purge-artifacts
cd jvm-packages/
mvn --no-transfer-progress package deploy -P default,gpu,release-to-s3 -Dspark.version=${spark_version} -DskipTests
## Deploy JVM packages to xgboost-maven-repo

# Scala 2.12, CPU variant
mvn --no-transfer-progress deploy -Pdefault,release-to-s3 -Dspark.version=${spark_version} -DskipTests
mvn clean
mvn clean -Pdefault,release-to-s3

# Scala 2.12, GPU variant
mvn --no-transfer-progress install -Pgpu -Dspark.version=${spark_version} -DskipTests
mvn --no-transfer-progress deploy -Pgpu,release-to-s3 -pl xgboost4j-spark-gpu -Dspark.version=${spark_version} -DskipTests

# Scala 2.13, CPU variant
pushd ..
python dev/change_scala_version.py --scala-version 2.13 --purge-artifacts
popd
mvn --no-transfer-progress deploy -Pdefault,release-to-s3 -Dspark.version=${spark_version} -DskipTests
mvn clean
mvn clean -Pdefault,release-to-s3

# Scala 2.13, GPU variant
mvn --no-transfer-progress install -Pgpu -Dspark.version=${spark_version} -DskipTests
mvn --no-transfer-progress deploy -Pgpu,release-to-s3 -pl xgboost4j-spark-gpu -Dspark.version=${spark_version} -DskipTests

set +x
set +e

0 comments on commit 6d0f38b

Please sign in to comment.