[backport] [CI] Upload libxgboost4j.dylib (M1) to S3 bucket (#9887)
* [CI] Set up CI for Mac M1 (#9699) * [CI] Improve CI for Mac M1 (#9748) * [CI] Build libxgboost4j.dylib with CMAKE_OSX_DEPLOYMENT_TARGET (#9749) * [CI] Upload libxgboost4j.dylib (M1) to S3 bucket (#9886)
This commit is contained in:
parent
d2d1751c03
commit
ad524f76ab
8
tests/buildkite/pipeline-mac-m1.yml
Normal file
8
tests/buildkite/pipeline-mac-m1.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
steps:
|
||||||
|
- block: ":rocket: Run this test job"
|
||||||
|
if: build.pull_request.id != null || build.branch =~ /^dependabot\//
|
||||||
|
- label: ":macos: Build and Test XGBoost for MacOS M1 with Clang 11"
|
||||||
|
command: "tests/buildkite/test-macos-m1-clang11.sh"
|
||||||
|
key: mac-m1-appleclang11
|
||||||
|
agents:
|
||||||
|
queue: mac-mini-m1
|
||||||
50
tests/buildkite/test-macos-m1-clang11.sh
Executable file
50
tests/buildkite/test-macos-m1-clang11.sh
Executable file
@ -0,0 +1,50 @@
|
|||||||
|
#!/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=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
|
||||||
|
ninja -v
|
||||||
|
popd
|
||||||
|
rm -rf build
|
||||||
|
set +x
|
||||||
|
|
||||||
|
echo "--- Upload Python wheel"
|
||||||
|
set -x
|
||||||
|
pushd lib
|
||||||
|
mv -v libxgboost4j.dylib libxgboost4j_m1_${BUILDKITE_COMMIT}.dylib
|
||||||
|
buildkite-agent artifact upload libxgboost4j_m1_${BUILDKITE_COMMIT}.dylib
|
||||||
|
if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]]
|
||||||
|
then
|
||||||
|
aws s3 cp libxgboost4j_m1_${BUILDKITE_COMMIT}.dylib \
|
||||||
|
s3://xgboost-nightly-builds/${BRANCH_NAME}/libxgboost4j/ \
|
||||||
|
--acl public-read --no-progress
|
||||||
|
fi
|
||||||
|
popd
|
||||||
|
set +x
|
||||||
|
|
||||||
|
# Ensure that XGBoost can be built with Clang 11
|
||||||
|
echo "--- Build and Test XGBoost with MacOS M1, Clang 11"
|
||||||
|
set -x
|
||||||
|
LLVM11_PATH=$(brew --prefix llvm\@11)
|
||||||
|
mkdir build
|
||||||
|
pushd build
|
||||||
|
cmake .. -GNinja -DCMAKE_C_COMPILER=${LLVM11_PATH}/bin/clang \
|
||||||
|
-DCMAKE_CXX_COMPILER=${LLVM11_PATH}/bin/clang++ -DGOOGLE_TEST=ON \
|
||||||
|
-DUSE_DMLC_GTEST=ON
|
||||||
|
ninja -v
|
||||||
@ -32,11 +32,10 @@ dependencies:
|
|||||||
- jsonschema
|
- jsonschema
|
||||||
- boto3
|
- boto3
|
||||||
- awscli
|
- awscli
|
||||||
- py-ubjson
|
|
||||||
- cffi
|
- cffi
|
||||||
- pyarrow
|
- pyarrow
|
||||||
- pyspark>=3.4.0
|
- pyspark>=3.4.0
|
||||||
- cloudpickle
|
- cloudpickle
|
||||||
- pip:
|
- pip:
|
||||||
- sphinx_rtd_theme
|
- sphinx_rtd_theme
|
||||||
- datatable
|
- py-ubjson
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user