2018-12-13 13:39:34 -08:00
|
|
|
sudo: false
|
|
|
|
notifications:
|
|
|
|
email: false
|
2018-12-13 13:53:41 -08:00
|
|
|
dist: xenial
|
2018-12-13 13:39:34 -08:00
|
|
|
language: python
|
|
|
|
python:
|
|
|
|
- "2.7"
|
|
|
|
- "3.6"
|
|
|
|
env:
|
2019-07-02 12:38:16 -07:00
|
|
|
- JAX_ENABLE_X64=0 JAX_NUM_GENERATED_CASES=25
|
|
|
|
- JAX_ENABLE_X64=1 JAX_NUM_GENERATED_CASES=25
|
2019-10-13 09:34:51 +02:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- python: "3.7"
|
|
|
|
env: JAX_ENABLE_X64=1 JAX_ONLY_DOCUMENTATION=true
|
2019-12-18 11:20:42 -08:00
|
|
|
include:
|
|
|
|
- python: "3.7"
|
|
|
|
env: MULTI_DEVICE_TEST=1
|
2019-10-13 09:34:51 +02:00
|
|
|
|
2018-12-13 13:39:34 -08:00
|
|
|
before_install:
|
|
|
|
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
|
2019-06-07 16:00:11 -07:00
|
|
|
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
|
2018-12-13 13:39:34 -08:00
|
|
|
else
|
2019-06-07 16:00:11 -07:00
|
|
|
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
|
2018-12-13 13:39:34 -08:00
|
|
|
fi
|
|
|
|
- bash miniconda.sh -b -p $HOME/miniconda
|
|
|
|
- export PATH="$HOME/miniconda/bin:$PATH"
|
2019-10-15 23:07:31 +00:00
|
|
|
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls yes
|
|
|
|
- conda config --set channel_priority strict
|
|
|
|
- conda config --set add_pip_as_python_dependency yes
|
|
|
|
- conda config --remove channels defaults
|
2018-12-13 13:39:34 -08:00
|
|
|
- conda config --add channels conda-forge
|
2019-10-15 23:07:31 +00:00
|
|
|
- conda update -q conda
|
2018-12-13 13:39:34 -08:00
|
|
|
install:
|
2019-12-11 12:27:11 -05:00
|
|
|
- conda install --yes python=$TRAVIS_PYTHON_VERSION pip six protobuf>=3.6.0 absl-py opt_einsum numpy scipy pytest-xdist pytest-benchmark fastcache
|
2019-11-26 10:24:06 -05:00
|
|
|
# The jaxlib version should match the minimum jaxlib version in
|
|
|
|
# jax/lib/__init__.py. This tests JAX PRs against the oldest permitted
|
|
|
|
# jaxlib.
|
2019-12-17 16:22:55 -08:00
|
|
|
- pip install jaxlib==0.1.37
|
2018-12-13 13:39:34 -08:00
|
|
|
- pip install -v .
|
2019-10-02 21:44:14 +02:00
|
|
|
# The following are needed to test the Colab notebooks and the documentation building
|
2019-10-13 09:34:51 +02:00
|
|
|
- if [[ "$JAX_ONLY_DOCUMENTATION" != "" ]]; then
|
|
|
|
conda install --yes -c conda-forge pandoc ipykernel;
|
|
|
|
conda install --yes sphinx sphinx_rtd_theme nbsphinx jupyter_client matplotlib;
|
2019-10-21 23:24:16 +02:00
|
|
|
pip install sklearn;
|
2019-10-13 09:34:51 +02:00
|
|
|
fi
|
2018-12-13 13:39:34 -08:00
|
|
|
script:
|
2019-12-17 17:49:06 -08:00
|
|
|
- if [[ "$MULTI_DEVICE_TEST" != "" ]]; then
|
|
|
|
XLA_FLAGS=--xla_force_host_platform_device_count=2 python tests/api_test.py MultiDeviceTest;
|
|
|
|
elif [[ "$JAX_ONLY_DOCUMENTATION" == "" ]]; then
|
2019-10-13 09:34:51 +02:00
|
|
|
pytest -n 1 tests examples -W ignore ;
|
|
|
|
else
|
|
|
|
sphinx-build -b html -D nbsphinx_execute=always docs docs/build/html;
|
2019-10-02 17:51:00 +02:00
|
|
|
fi
|