-
-
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.
[CI] Add CI pipeline to build libxgboost4j.so targeting Linux ARM64 (#…
- Loading branch information
Showing
9 changed files
with
158 additions
and
43 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
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,29 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
source tests/buildkite/conftest.sh | ||
|
||
command_wrapper="tests/ci_build/ci_build.sh jvm_manylinux2014_aarch64" | ||
|
||
# Build XGBoost4J binary | ||
echo "--- Build libxgboost4j.so (targeting glibc 2.17)" | ||
set -x | ||
mkdir build | ||
$command_wrapper bash -c \ | ||
"cd build && cmake .. -DJVM_BINDINGS=ON -DUSE_OPENMP=ON && make -j$(nproc)" | ||
ldd lib/libxgboost4j.so | ||
objdump -T lib/libxgboost4j.so | grep GLIBC_ | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vu | ||
|
||
echo "--- Upload libxgboost4j.so" | ||
pushd lib | ||
libname=libxgboost4j_linux_arm64_${BUILDKITE_COMMIT}.so | ||
mv -v libxgboost4j.so ${libname} | ||
buildkite-agent artifact upload ${libname} | ||
#if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]] | ||
#then | ||
aws s3 cp ${libname} \ | ||
s3://xgboost-nightly-builds/${BRANCH_NAME}/libxgboost4j/ \ | ||
--acl public-read --no-progress | ||
#fi | ||
popd |
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,29 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
source tests/buildkite/conftest.sh | ||
|
||
command_wrapper="tests/ci_build/ci_build.sh jvm_manylinux2014_x86_64" | ||
|
||
# Build XGBoost4J binary | ||
echo "--- Build libxgboost4j.so (targeting glibc 2.17)" | ||
set -x | ||
mkdir build | ||
$command_wrapper bash -c \ | ||
"cd build && cmake .. -GNinja -DJVM_BINDINGS=ON -DUSE_OPENMP=ON && ninja -v" | ||
ldd lib/libxgboost4j.so | ||
objdump -T lib/libxgboost4j.so | grep GLIBC_ | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vu | ||
|
||
echo "--- Upload libxgboost4j.so" | ||
pushd lib | ||
libname=libxgboost4j_linux_x86_64_${BUILDKITE_COMMIT}.so | ||
mv -v libxgboost4j.so ${libname} | ||
buildkite-agent artifact upload ${libname} | ||
#if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]] | ||
#then | ||
aws s3 cp ${libname} \ | ||
s3://xgboost-nightly-builds/${BRANCH_NAME}/libxgboost4j/ \ | ||
--acl public-read --no-progress | ||
#fi | ||
popd |
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,41 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
source tests/buildkite/conftest.sh | ||
|
||
# Display system info | ||
echo "--- Display system information" | ||
set -x | ||
system_profiler SPSoftwareDataType | ||
sysctl -n machdep.cpu.brand_string | ||
uname -m | ||
set +x | ||
|
||
# Build XGBoost4J binary | ||
echo "--- Build libxgboost4j.dylib" | ||
set -x | ||
mkdir build | ||
pushd build | ||
export JAVA_HOME=$(/usr/libexec/java_home) | ||
cmake .. -GNinja -DJVM_BINDINGS=ON -DUSE_OPENMP=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 | ||
ninja -v | ||
popd | ||
rm -rf build | ||
otool -L lib/libxgboost.dylib | ||
set +x | ||
|
||
echo "--- Upload libxgboost4j.dylib" | ||
set -x | ||
pushd lib | ||
libname=libxgboost4j_m1_${BUILDKITE_COMMIT}.dylib | ||
mv -v libxgboost4j.dylib ${libname} | ||
buildkite-agent artifact upload ${libname} | ||
#if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]] | ||
#then | ||
aws s3 cp ${libname} \ | ||
s3://xgboost-nightly-builds/${BRANCH_NAME}/libxgboost4j/ \ | ||
--acl public-read --no-progress | ||
#fi | ||
popd | ||
set +x |
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
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
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
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,17 @@ | ||
FROM quay.io/pypa/manylinux2014_aarch64 | ||
|
||
RUN yum update -y && yum install -y java-1.8.0-openjdk-devel | ||
|
||
# Install lightweight sudo (not bound to TTY) | ||
ENV GOSU_VERSION 1.10 | ||
RUN set -ex; \ | ||
curl -o /usr/local/bin/gosu -L "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-arm64" && \ | ||
chmod +x /usr/local/bin/gosu && \ | ||
gosu nobody true | ||
|
||
# Default entry-point to use if running locally | ||
# It will preserve attributes of created files | ||
COPY entrypoint.sh /scripts/ | ||
|
||
WORKDIR /workspace | ||
ENTRYPOINT ["/scripts/entrypoint.sh"] |
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,17 @@ | ||
FROM quay.io/pypa/manylinux2014_x86_64 | ||
|
||
RUN yum update -y && yum install -y java-1.8.0-openjdk-devel ninja-build | ||
|
||
# Install lightweight sudo (not bound to TTY) | ||
ENV GOSU_VERSION 1.10 | ||
RUN set -ex; \ | ||
curl -o /usr/local/bin/gosu -L "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" && \ | ||
chmod +x /usr/local/bin/gosu && \ | ||
gosu nobody true | ||
|
||
# Default entry-point to use if running locally | ||
# It will preserve attributes of created files | ||
COPY entrypoint.sh /scripts/ | ||
|
||
WORKDIR /workspace | ||
ENTRYPOINT ["/scripts/entrypoint.sh"] |