-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,6 +162,11 @@ jobs: | |
run: bash ops/pipeline/build-test-jvm-packages.sh | ||
env: | ||
SCALA_VERSION: 2.13 | ||
- name: Stash files | ||
run: bash ops/stash_artifacts.sh lib/libxgboost4j.so | ||
env: | ||
COMMAND: upload | ||
KEY: build-test-jvm-packages | ||
|
||
build-test-jvm-packages-other-os: | ||
name: Build and test JVM packages (${{ matrix.os }}) | ||
|
@@ -239,3 +244,41 @@ jobs: | |
COMMAND: download | ||
KEY: build-jvm-gpu | ||
- run: bash ops/pipeline/test-jvm-gpu.sh | ||
|
||
deploy-jvm-packages: | ||
name: Deploy JVM packages to S3 (${{ matrix.variant }}) | ||
needs: [build-jvm-gpu, build-test-jvm-packages, test-jvm-packages-gpu] | ||
runs-on: | ||
- runs-on=${{ github.run_id }} | ||
- runner=linux-amd64-cpu | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- variant: cpu | ||
container_id: xgb-ci.jvm | ||
artifact_from: build-test-jvm-packages | ||
- variant: gpu | ||
container_id: xgb-ci.jvm_gpu_build | ||
artifact_from: build-jvm-gpu | ||
steps: | ||
# Restart Docker daemon so that it recognizes the ephemeral disks | ||
- run: sudo systemctl restart docker | ||
- uses: actions/[email protected] | ||
with: | ||
submodules: "true" | ||
- name: Fetch container from cache | ||
run: bash ops/docker_build.sh | ||
env: | ||
CONTAINER_ID: ${{ matrix.container_id }} | ||
- name: Unstash files | ||
run: | | ||
bash ops/stash_artifacts.sh lib/libxgboost4j.so | ||
ls -lh lib/libxgboost4j.so | ||
env: | ||
COMMAND: download | ||
KEY: ${{ matrix.artifact_from }} | ||
- name: Deploy JVM packages to S3 | ||
run: >- | ||
bash ops/pipeline/deploy-jvm-packages.sh ${{ matrix.variant }} | ||
${{ matrix.container_id }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
## Deploy JVM packages to xgboost-maven-repo S3 bucket | ||
|
||
set -euox pipefail | ||
|
||
if [[ "$#" -lt 1 ]] | ||
then | ||
echo "Usage: $0 {cpu,gpu}" | ||
exit 1 | ||
fi | ||
|
||
variant="$1" | ||
|
||
maven_options="-DskipTests -Dmaven.test.skip=true -Dskip.native.build=true" | ||
case "$variant" in | ||
cpu) | ||
# CPU variant | ||
for scala_version in 2.12 2.13 | ||
do | ||
python dev/change_scala_version.py --scala-version ${scala_version} --purge-artifacts | ||
pushd jvm-packages | ||
mvn --no-transfer-progress deploy -Pdefault,release-to-s3 ${maven_options} | ||
mvn clean | ||
mvn clean -Pdefault,release-to-s3 | ||
popd | ||
done | ||
;; | ||
gpu) | ||
# GPU variant | ||
for scala_version in 2.12 2.13 | ||
do | ||
python dev/change_scala_version.py --scala-version ${scala_version} --purge-artifacts | ||
pushd jvm-packages | ||
mvn --no-transfer-progress install -Pgpu ${maven_options} | ||
mvn --no-transfer-progress deploy -Pgpu,release-to-s3 -pl xgboost4j-spark-gpu ${maven_options} | ||
mvn clean | ||
mvn clean -Pgpu,release-to-s3 | ||
popd | ||
done | ||
;; | ||
*) | ||
echo "Unrecognized argument: $variant" | ||
exit 2 | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -euox pipefail | ||
|
||
source ops/pipeline/enforce-ci.sh | ||
|
||
if [[ "$#" -lt 2 ]] | ||
then | ||
echo "Usage: $0 {cpu,gpu} {container_id}" | ||
exit 1 | ||
fi | ||
|
||
variant="$1" | ||
container_id="$2" | ||
|
||
# if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]] | ||
# then | ||
echo "--- Deploy JVM packages to xgboost-maven-repo S3 repo" | ||
python3 ops/docker_run.py --container-id "${container_id}" \ | ||
-- ops/pipeline/deploy-jvm-packages-impl.sh "${variant}" | ||
# fi |