Fix compilation on Mac OSX High Sierra (10.13) (#5597)
* Fix compilation on Mac OSX High Sierra * [CI] Build Mac OSX binary wheel using Travis CI
This commit is contained in:
committed by
GitHub
parent
e726dd9902
commit
f68155de6c
@@ -21,8 +21,6 @@ whl_path = sys.argv[1]
|
||||
commit_id = sys.argv[2]
|
||||
platform_tag = sys.argv[3]
|
||||
|
||||
assert platform_tag in ['manylinux1_x86_64', 'manylinux2010_x86_64', 'win_amd64']
|
||||
|
||||
dirname, basename = os.path.dirname(whl_path), os.path.basename(whl_path)
|
||||
|
||||
with cd(dirname):
|
||||
|
||||
@@ -23,18 +23,42 @@ if [ ${TASK} == "python_test" ]; then
|
||||
mkdir build && cd build
|
||||
cmake .. -DUSE_OPENMP=ON -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
make -j$(nproc)
|
||||
cd ..
|
||||
|
||||
echo "-------------------------------"
|
||||
conda activate python3
|
||||
conda --version
|
||||
python --version
|
||||
|
||||
# Build binary wheel
|
||||
cd ../python-package
|
||||
python setup.py bdist_wheel
|
||||
TAG=macosx_10_13_x86_64.macosx_10_14_x86_64.macosx_10_15_x86_64
|
||||
python ../tests/ci_build/rename_whl.py dist/*.whl ${TRAVIS_COMMIT} ${TAG}
|
||||
python -m pip install ./dist/xgboost-*-py3-none-${TAG}.whl
|
||||
|
||||
# Run unit tests
|
||||
cd ..
|
||||
python -m pip install graphviz pytest pytest-cov codecov
|
||||
python -m pip install datatable
|
||||
python -m pip install numpy scipy pandas matplotlib scikit-learn dask[complete]
|
||||
python -m pytest -v --fulltrace -s tests/python --cov=python-package/xgboost || exit -1
|
||||
codecov
|
||||
|
||||
# Deploy binary wheel to S3
|
||||
python -m pip install awscli
|
||||
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]
|
||||
then
|
||||
S3_DEST="s3://xgboost-nightly-builds/PR-${TRAVIS_PULL_REQUEST}/"
|
||||
else
|
||||
if [ "${TRAVIS_BRANCH}" == "master" ]
|
||||
then
|
||||
S3_DEST="s3://xgboost-nightly-builds/"
|
||||
elif [ -z "${TRAVIS_TAG}" ]
|
||||
then
|
||||
S3_DEST="s3://xgboost-nightly-builds/${TRAVIS_BRANCH}/"
|
||||
fi
|
||||
fi
|
||||
python -m awscli s3 cp python-package/dist/*.whl "${S3_DEST}" || true
|
||||
fi
|
||||
|
||||
if [ ${TASK} == "java_test" ]; then
|
||||
|
||||
Reference in New Issue
Block a user