Fix travis. (#7237)
This commit is contained in:
parent
31c1e13f90
commit
32e0858501
@ -28,7 +28,6 @@ addons:
|
|||||||
update: false
|
update: false
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- snapd
|
|
||||||
- unzip
|
- unzip
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
|
|||||||
@ -92,6 +92,7 @@ fi
|
|||||||
|
|
||||||
if [ ${TASK} == "s390x_test" ]; then
|
if [ ${TASK} == "s390x_test" ]; then
|
||||||
set -e
|
set -e
|
||||||
|
python3 -m pip install --user pytest hypothesis cmake
|
||||||
|
|
||||||
# Build and run C++ tests
|
# Build and run C++ tests
|
||||||
rm -rf build
|
rm -rf build
|
||||||
@ -102,6 +103,5 @@ if [ ${TASK} == "s390x_test" ]; then
|
|||||||
|
|
||||||
# Run model compatibility tests
|
# Run model compatibility tests
|
||||||
cd ..
|
cd ..
|
||||||
python3 -m pip install --user pytest hypothesis
|
|
||||||
PYTHONPATH=./python-package python3 -m pytest --fulltrace -v -rxXs tests/python/test_basic.py
|
PYTHONPATH=./python-package python3 -m pytest --fulltrace -v -rxXs tests/python/test_basic.py
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -1,11 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/27
|
if [ ${TRAVIS_OS_NAME} == "osx" ]; then
|
||||||
# Use libomp 11.1.0: https://github.com/dmlc/xgboost/issues/7039
|
# https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/27
|
||||||
brew update # Force update, so that update doesn't overwrite our version of libomp.rb
|
# Use libomp 11.1.0: https://github.com/dmlc/xgboost/issues/7039
|
||||||
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/679923b4eb48a8dc7ecc1f05d06063cd79b3fc00/Formula/libomp.rb -O $(find $(brew --repository) -name libomp.rb)
|
brew update # Force update, so that update doesn't overwrite our version of libomp.rb
|
||||||
brew install cmake libomp
|
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/679923b4eb48a8dc7ecc1f05d06063cd79b3fc00/Formula/libomp.rb -O $(find $(brew --repository) -name libomp.rb)
|
||||||
brew pin libomp
|
brew install cmake libomp
|
||||||
|
brew pin libomp
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [ ${TASK} == "python_test" ] || [ ${TASK} == "python_sdist_test" ]; then
|
if [ ${TASK} == "python_test" ] || [ ${TASK} == "python_sdist_test" ]; then
|
||||||
@ -29,9 +32,6 @@ if [ ${TASK} == "python_test" ] || [ ${TASK} == "python_sdist_test" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${TASK} == "s390x_test" ] && [ ${TRAVIS_CPU_ARCH} == "s390x" ]; then
|
if [ ${TASK} == "s390x_test" ] && [ ${TRAVIS_CPU_ARCH} == "s390x" ]; then
|
||||||
sudo snap install cmake --channel=3.17/beta --classic
|
|
||||||
export PATH=/snap/bin:${PATH}
|
|
||||||
cmake --version
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y --no-install-recommends tar unzip wget git build-essential ninja-build \
|
sudo apt-get install -y --no-install-recommends tar unzip wget git build-essential ninja-build \
|
||||||
time python3 python3-pip python3-numpy python3-scipy python3-sklearn r-base
|
time python3 python3-pip python3-numpy python3-scipy python3-sklearn r-base
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user