forked from pyro-ppl/pyro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
92 lines (85 loc) · 2.82 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
language: python
env:
global:
- PYTHONPATH=$PWD:$PYTHONPATH
- CXX="g++-8"
- CC="gcc-8"
addons:
apt:
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
packages:
- gcc-8
- g++-8
- ninja-build
- graphviz # for sphinx docs
cache:
directories:
- $HOME/.cache/pip
- $HOME/.data
install:
- pip install -U pip
# Keep track of pyro-api master branch
- pip install https://github.com/pyro-ppl/pyro-api/archive/master.zip
# Download PyTorch
- pip install numpy
- pip install torch==1.8.0+cpu torchvision==0.9.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
- pip install .[test]
- pip install coveralls
- pip freeze
branches:
only:
- master
- dev
jobs:
include:
- stage: lint
name: lint
python: 3.6
before_install: pip install flake8 isort>=5.0 mypy nbstripout nbformat
install:
script:
- make lint
#- make scrub;
# git diff-index --quiet HEAD
- stage: auxiliary modules
name: docs
python: 3.6
script:
- pip install -r docs/requirements.txt
- make docs
- make doctest
- name: perf
python: 3.6
script:
- pip install -e .[profile]
- pytest -vs --benchmark-disable tests/perf/test_benchmark.py
- name: profiler
python: 3.6
script:
- pip install -e .[profile]
- python -m profiler.distributions
- stage: unit test
name: unit
python: 3.6
script: pytest -vs --cov=pyro --cov-config .coveragerc --stage unit --durations 20
- name: examples
python: 3.6
script:
- CI=1 pytest -vs --cov=pyro --cov-config .coveragerc --stage test_examples --durations 10
- grep -l smoke_test tutorial/source/*.ipynb | xargs grep -L 'smoke_test = False' \
| CI=1 xargs pytest -vx --nbval-lax --current-env -W ignore::FutureWarning
- name: integration batch_1
python: 3.6
script: pytest -vs --cov=pyro --cov-config .coveragerc --stage integration_batch_1 --durations 10
- name: integration batch_2
python: 3.6
script: pytest -vs --cov=pyro --cov-config .coveragerc --stage integration_batch_2 --durations 10
- name: funsor
python: 3.6
script:
- pip install -e .[funsor]
- pytest -vs --cov=pyro --cov-config .coveragerc --stage funsor --durations 10
- CI=1 pytest -vs --cov=pyro --cov-config .coveragerc --stage test_examples --durations 10 -k funsor
after_success:
- coveralls