forked from jax-ml/jax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (51 loc) · 1.94 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
notifications:
email: false
dist: xenial
language: python
os: linux
jobs:
include:
- python: "3.6"
env: JAX_ONLY_CHECK_TYPES=true
- python: "3.6"
env: JAX_ENABLE_X64=0 JAX_NUM_GENERATED_CASES=25
- python: "3.6"
env: JAX_ENABLE_X64=1 JAX_NUM_GENERATED_CASES=25
- python: "3.7"
env: JAX_ENABLE_X64=1 JAX_ONLY_DOCUMENTATION=true
before_install:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- 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
- conda config --add channels conda-forge
- conda update -q conda
install:
- conda install --yes python=$TRAVIS_PYTHON_VERSION pip absl-py opt_einsum numpy scipy pytest-xdist pytest-benchmark mypy=0.770
- pip install msgpack
- if [ "$JAX_ONLY_CHECK_TYPES" = true ]; then
pip install pytype ;
fi
# The jaxlib version should match the minimum jaxlib version in
# jax/lib/__init__.py. This tests JAX PRs against the oldest permitted
# jaxlib.
- pip install jaxlib==0.1.45
- pip install -v .
# The following are needed to test the Colab notebooks and the documentation building
- if [ "$JAX_ONLY_DOCUMENTATION" = true ]; then
conda install --yes -c conda-forge pandoc ipykernel;
conda install --yes sphinx sphinx_rtd_theme nbsphinx sphinx-autodoc-typehints jupyter_client matplotlib;
pip install sklearn;
fi
script:
- if [ "$JAX_ONLY_DOCUMENTATION" = true ]; then
sphinx-build -b html -D nbsphinx_execute=always docs docs/build/html ;
elif [ "$JAX_ONLY_CHECK_TYPES" = true ]; then
echo "===== Checking with mypy ====" &&
time mypy --config-file=mypy.ini jax ;
else
pytest tests examples ;
fi