Skip to content

Commit

Permalink
BLD add a mac run on Travis (#12824)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnothman authored and ogrisel committed Dec 20, 2018
1 parent d011aed commit 951c4f1
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 22 deletions.
21 changes: 11 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ env:

matrix:
include:
# This environment tests that scikit-learn can be built against
# Latest dependencies on macOS with MKL
- env: DISTRIB="conda" PYTHON_VERSION="*" INSTALL_MKL="true"
NUMPY_VERSION="*" SCIPY_VERSION="*" CYTHON_VERSION="*"
PILLOW_VERSION="*" JOBLIB_VERSION="*" COVERAGE=true
language: generic
if: type != cron
os: osx
# Linux environment to test that scikit-learn can be built against
# versions of numpy, scipy with ATLAS that comes with Ubuntu Xenial 16.04
# i.e. numpy 1.11 and scipy 0.17
- env: DISTRIB="ubuntu" PYTHON_VERSION="3.5"
Expand All @@ -36,18 +43,12 @@ matrix:
- libatlas3-base
- libatlas-base-dev
- libatlas-dev
# Python 3.5 build without SITE_JOBLIB
# Linux + Python 3.5 build with OpenBLAS and without SITE_JOBLIB
- env: DISTRIB="conda" PYTHON_VERSION="3.5" INSTALL_MKL="false"
NUMPY_VERSION="1.11.0" SCIPY_VERSION="0.17.0" CYTHON_VERSION="*"
PILLOW_VERSION="4.0.0" COVERAGE=true
if: type != cron
# Python 3.5 build
- env: DISTRIB="conda" PYTHON_VERSION="3.5" INSTALL_MKL="false"
NUMPY_VERSION="1.11.0" SCIPY_VERSION="0.17.0" CYTHON_VERSION="*"
PILLOW_VERSION="4.0.0" COVERAGE=true
SKLEARN_SITE_JOBLIB=1 JOBLIB_VERSION="0.11"
if: type != cron
# This environment tests the latest available dependencies.
# Linux environment to test the latest available dependencies and MKL.
# It runs tests requiring pandas and PyAMG.
# It also runs with the site joblib instead of the vendored copy of joblib.
- env: DISTRIB="conda" PYTHON_VERSION="*" INSTALL_MKL="true"
Expand All @@ -57,7 +58,7 @@ matrix:
CHECK_PYTEST_SOFT_DEPENDENCY="true" TEST_DOCSTRINGS="true"
SKLEARN_SITE_JOBLIB=1 CHECK_WARNINGS="true"
if: type != cron
# This environment tests scikit-learn against numpy and scipy master
# Linux environment to test scikit-learn against numpy and scipy master
# installed from their CI wheels in a virtualenv with the Python
# interpreter provided by travis.
- python: 3.7
Expand Down
4 changes: 2 additions & 2 deletions build_tools/travis/after_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ if [[ "$COVERAGE" == "true" ]]; then
# Need to run codecov from a git checkout, so we copy .coverage
# from TEST_DIR where pytest has been run
cp $TEST_DIR/.coverage $TRAVIS_BUILD_DIR
cd $TRAVIS_BUILD_DIR

# Ignore codecov failures as the codecov server is not
# very reliable but we don't want travis to report a failure
# in the github UI just because the coverage report failed to
# be published.
codecov || echo "codecov upload failed"
codecov --root $TRAVIS_BUILD_DIR || echo "codecov upload failed"
fi
33 changes: 23 additions & 10 deletions build_tools/travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,33 @@ echo 'List files from cached directories'
echo 'pip:'
ls $HOME/.cache/pip

export CC=/usr/lib/ccache/gcc
export CXX=/usr/lib/ccache/g++
# Useful for debugging how ccache is used
# export CCACHE_LOGFILE=/tmp/ccache.log
# ~60M is used by .ccache when compiling from scratch at the time of writing
ccache --max-size 100M --show-stats
if [ $TRAVIS_OS_NAME = "linux" ]
then
export CC=/usr/lib/ccache/gcc
export CXX=/usr/lib/ccache/g++
# Useful for debugging how ccache is used
# export CCACHE_LOGFILE=/tmp/ccache.log
# ~60M is used by .ccache when compiling from scratch at the time of writing
ccache --max-size 100M --show-stats
fi

make_conda() {
TO_INSTALL="$@"
# Deactivate the travis-provided virtual environment and setup a
# conda-based environment instead
deactivate
# If Travvis has language=generic, deactivate does not exist. `|| :` will pass.
deactivate || :

# Install miniconda
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
if [ $TRAVIS_OS_NAME = "osx" ]
then
fname=Miniconda3-latest-MacOSX-x86_64.sh
else
fname=Miniconda3-latest-Linux-x86_64.sh
fi
wget https://repo.continuum.io/miniconda/$fname \
-O miniconda.sh
MINICONDA_PATH=/home/travis/miniconda
MINICONDA_PATH=$HOME/miniconda
chmod +x miniconda.sh && ./miniconda.sh -b -p $MINICONDA_PATH
export PATH=$MINICONDA_PATH/bin:$PATH
conda update --yes conda
Expand Down Expand Up @@ -115,6 +125,9 @@ except ImportError:
pass
"
python setup.py develop
ccache --show-stats
if [ $TRAVIS_OS_NAME = "linux" ]
then
ccache --show-stats
fi
# Useful for debugging how ccache is used
# cat $CCACHE_LOGFILE

0 comments on commit 951c4f1

Please sign in to comment.