Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions .github/workflows/jvm_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
with:
tag-prefix: jvm-tests

build-jvm-manylinux2014:
build-jvm-manylinux:
name: >-
Build libxgboost4j.so targeting glibc 2.17
Build libxgboost4j.so targeting glibc 2.28
(arch ${{ matrix.arch }}, runner ${{ matrix.runner }})
runs-on:
- runs-on
- runner=${{ matrix.runner }}
- run-id=${{ github.run_id }}
- tag=jvm-tests-build-jvm-manylinux2014-${{ matrix.arch }}
- tag=jvm-tests-build-jvm-manylinux-${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
Expand All @@ -48,7 +48,14 @@ jobs:
submodules: "true"
- name: Log into Docker registry (AWS ECR)
run: bash ops/pipeline/login-docker-registry.sh
- run: bash ops/pipeline/build-jvm-manylinux2014.sh ${{ matrix.arch }}
- run: bash ops/pipeline/build-jvm-manylinux.sh ${{ matrix.arch }}
- name: Stash x86_64 library
if: matrix.arch == 'x86_64'
run: |
python3 ops/pipeline/manage-artifacts.py upload \
--s3-bucket ${{ env.RUNS_ON_S3_BUCKET_CACHE }} \
--prefix cache/${{ github.run_id }}/build-jvm-manylinux-x86_64 \
lib/libxgboost4j.so

build-jvm-gpu:
name: Build libxgboost4j.so with CUDA
Expand Down Expand Up @@ -115,7 +122,7 @@ jobs:

build-test-jvm-packages-linux:
name: Build and test JVM packages (Linux, Scala ${{ matrix.scala_version }})
needs: ci-configure
needs: [ci-configure, build-jvm-manylinux]
runs-on:
- runs-on=${{ github.run_id }}
- runner=linux-amd64-cpu
Expand All @@ -131,11 +138,19 @@ jobs:
password: ${{ needs.ci-configure.outputs.docker_password }}
env:
SCALA_VERSION: ${{ matrix.scala_version }}
SKIP_NATIVE_BUILD: "1"
steps:
- uses: runs-on/action@v2
- uses: actions/checkout@v7.0.1
with:
submodules: "true"
- name: Unstash x86_64 library
run: |
python3 ops/pipeline/manage-artifacts.py download \
--s3-bucket ${{ env.RUNS_ON_S3_BUCKET_CACHE }} \
--prefix cache/${{ github.run_id }}/build-jvm-manylinux-x86_64 \
--dest-dir lib \
libxgboost4j.so
- name: Build and test JVM packages (Scala ${{ matrix.scala_version }})
run: bash ops/pipeline/build-test-jvm-packages.sh
- name: Stash files
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
## Build libxgboost4j.so targeting glibc 2.17 systems
## Build libxgboost4j.so targeting glibc 2.28 systems

set -euo pipefail

Expand All @@ -10,7 +10,7 @@ then
fi

arch=$1
image_repo="xgb-ci.manylinux2014_${arch}"
image_repo="xgb-ci.manylinux_2_28_${arch}"

source ops/pipeline/classify-git-branch.sh
source ops/pipeline/get-docker-registry-details.sh
Expand All @@ -19,7 +19,7 @@ source ops/pipeline/get-image-tag.sh
IMAGE_URI="${DOCKER_REGISTRY_URL}/${image_repo}:${IMAGE_TAG}"

# Build XGBoost4J binary
echo "--- Build libxgboost4j.so (targeting glibc 2.17)"
echo "--- Build libxgboost4j.so (targeting glibc 2.28)"
set -x
mkdir build
python3 ops/docker_run.py \
Expand All @@ -32,7 +32,7 @@ objdump -T lib/libxgboost4j.so | grep GLIBC_ | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g
if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]]
then
libname=lib/libxgboost4j_linux_${arch}.so
mv -v lib/libxgboost4j.so ${libname}
cp -v lib/libxgboost4j.so ${libname}
python3 ops/pipeline/manage-artifacts.py upload \
--s3-bucket xgboost-nightly-builds \
--prefix ${BRANCH_NAME}/${GITHUB_SHA} --make-public \
Expand Down
2 changes: 1 addition & 1 deletion ops/pipeline/build-python-wheels-cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi

if [[ "$#" -lt 2 ]]
then
echo "Usage: $0 {manylinux2014,manylinux_2_28} {x86_64,aarch64}"
echo "Usage: $0 manylinux_2_28 {x86_64,aarch64}"
Comment thread
trivialfis marked this conversation as resolved.
exit 1
fi

Expand Down
22 changes: 11 additions & 11 deletions ops/pipeline/build-test-jvm-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,6 @@ fi

cd jvm-packages/

# Ensure that XGBoost4J-Spark is compatible with multiple versions of Spark
if [[ "${USE_CUDA:-}" != "1" && "${SCALA_VERSION}" == "2.12" ]]
then
for spark_version in 3.1.3 3.2.4 3.3.4 3.4.3
do
mvn --no-transfer-progress clean package -Dspark.version=${spark_version} \
-pl xgboost4j,xgboost4j-spark
done
fi

set +x
mvn_options=""
if [[ "${USE_CUDA:-}" == "1" ]]
Expand All @@ -70,10 +60,20 @@ then
fi
set -x

# Ensure that XGBoost4J-Spark is compatible with multiple versions of Spark
if [[ "${USE_CUDA:-}" != "1" && "${SCALA_VERSION}" == "2.12" ]]
then
for spark_version in 3.1.3 3.2.4 3.3.4 3.4.3
do
mvn --no-transfer-progress clean package -Dspark.version=${spark_version} \
-pl xgboost4j,xgboost4j-spark ${mvn_options}
done
fi

mvn --no-transfer-progress clean install ${mvn_options}

# Integration tests
if [[ "${USE_CUDA:-}" != "1" ]]
then
mvn --no-transfer-progress test -pl xgboost4j-example
mvn --no-transfer-progress test -pl xgboost4j-example ${mvn_options}
fi
Loading