[CI] Improve CI for Mac M1 (#9748)
* [CI] Improve CI for Mac M1 * Add -v flag * Disable OpenMP in libxgboost4j.dylib * Target MacOS 10.15+ to use C++17
This commit is contained in:
committed by
GitHub
parent
d3f0646779
commit
1b9ed4a4a1
@@ -12,14 +12,17 @@ sysctl -n machdep.cpu.brand_string
|
||||
uname -m
|
||||
set +x
|
||||
|
||||
# Create new Conda env
|
||||
echo "--- Set up Conda env"
|
||||
. $HOME/mambaforge/etc/profile.d/conda.sh
|
||||
. $HOME/mambaforge/etc/profile.d/mamba.sh
|
||||
conda_env=xgboost_dev_$(uuidgen | tr '[:upper:]' '[:lower:]' | tr -d '-')
|
||||
mamba create -y -n ${conda_env} python=3.8
|
||||
conda activate ${conda_env}
|
||||
mamba env update -n ${conda_env} --file tests/ci_build/conda_env/macos_cpu_test.yml
|
||||
# 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
|
||||
ninja -v
|
||||
popd
|
||||
rm -rf build
|
||||
set +x
|
||||
|
||||
# Ensure that XGBoost can be built with Clang 11
|
||||
echo "--- Build and Test XGBoost with MacOS M1, Clang 11"
|
||||
|
||||
Reference in New Issue
Block a user