forked from facebook/Ax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
153 lines (148 loc) · 6.86 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
language: python
python:
- 3.7
notifications:
email:
- recipients:
if: branch = master
on_success: never
on_failure: always
jobs:
allow_failures:
# create custom environment variable for flagging jobs that are allowed to fail
- env: ALLOW_FAILURE=true
include:
- name: "Tests + Coverage: Python 3.7"
python: "3.7"
install:
- pip install git+https://github.com/cornellius-gp/gpytorch.git
- pip install git+https://github.com/pytorch/botorch.git
- pip install -q -e .[dev,mysql,notebook]
script:
- pytest -ra --cov=ax
- name: "Tests: Python 3.8"
python: "3.8"
install:
- pip install git+https://github.com/cornellius-gp/gpytorch.git
- pip install git+https://github.com/pytorch/botorch.git
- pip install -q -e .[dev,mysql,notebook]
script:
- pytest -ra
- name: "Lint: black: Python 3.7"
python: "3.7"
install:
- pip install black==19.3b0
script:
- black --check --diff .
- name: "Lint: flake8: Python 3.7"
python: "3.7"
install:
- pip install flake8
script:
# don't use .flake8 config for now, since don't need custom plugin
- flake8 --isolated --ignore=T484,T499,W503,E704,E231,E203 --max-line-length=88
- name: "Docs: Sphinx: Python 3.7"
python: "3.7"
install:
- pip install git+https://github.com/cornellius-gp/gpytorch.git
- pip install git+https://github.com/pytorch/botorch.git
- pip install -q -e .[dev,mysql,notebook]
script:
# warnings treated as errors
- sphinx-build -WT sphinx/source sphinx/build
# since -W flag breaks on first error, re-run without it to print all
- sphinx-build sphinx/source sphinx/build
- name: "Build with Latest Stable BoTorch (for pushing new release)"
# Checks whether the current version on Ax master is compatible with latest
# stable BoTorch release; this test should be passing before cutting new
# version of Ax.
python: "3.7"
env: ALLOW_FAILURE=true
install:
- pip install botorch
- pip install -q -e .[dev,mysql,notebook]
script:
- pytest -ra
- name: "Docs: Sphinx Coverage: Python 3.7"
python: "3.7"
script:
- python scripts/validate_sphinx.py -p "${pwd}"
# Pre-deployment stage enforces compatibility with stable BoTorch.
- name: "Build with BoTorch Version in setup.py (only for tagged versions)"
# Checks whether the current version on Ax master is compatible with latest
# stable BoTorch release; this test should be passing before cutting new
# version of Ax. This test is required in this case, because we should not
# deploy if it fails.
# TODO: add the same test for compatibility with the minimum BoTorch
# version listed in Ax' `setup.py`.
stage: Pre-deploy
python: "3.7"
install:
- pip install -q -e .[dev,mysql,notebook]
script:
- pytest -ra
# Version website-building stage is triggered on a tag that starts with 'v'
# if the pre-deploy stage (previous) passes.
- stage: Deploy Version Website + deploy to PyPI (On Release)
python: "3.7"
install:
- pip install -q -e .[dev,mysql,notebook]
- pip install torchvision # Required for building tutorial notebooks.
- pip install ray # Required for building RayTune tutorial notebook.
- pip install tabulate # Required for building RayTune tutorial notebook.
git:
depth: false
script:
- travis_wait 90 bash scripts/publish_site.sh -d -k python3 -v $TRAVIS_TAG
# - python -c "print('Skipping website deployment...')" # Use for testing deployment.
deploy:
provider: pypi
# server: https://test.pypi.org/legacy/ # For testing; use test.pypi pw.
user: drfreund
password:
secure: P0cIqYhKg3d4gbkXA/RAnf3k0c2xLA606Ya3p2ZtDWmdD9XvY+NPQrSARQgT0nRMkQC3Hol/mjZIhHVMBb4LeNx1EttVClgeSxOTqlwcldD/u1S5auAjAPMJogGfTdOn3vnFlAEDE0ZEjVBjdh2XUkCvNhNYlx/AbXb8JCMa8dWW+mIzlv0CRQYQIcWWlilYyclRD8bi/ZQyVGGm65ux/CjgjiYGK7cf/E6QUqIiq0KsKIsDmsxZX20Bo6eYLwcLIkiSPdRS9gqi7Dh7NWa7NX1UpleCOvL/m8FoqgfF3XYxwhGX48ry2AtrZPSdv2NEo41NYOHbTZUgxZIRiM/Q6Q2L71+FMybrg2cKpcjLrC3OUP0x5QprASqAhesx581WFwHGM/y6T5YJjKOdEXdHpsCJyoQic2k/AePtxQL0w+PiotM73JO4/n9vNpZoXc2VuOqESE5YkY4Bq0NGgWYOtoZkY+pilqbGEo0NbwftICFAfpb54rvl5/OFa3F55eNmi2KplK2D/ztPuBasVN4f/CczaLxt1Kzko4JBhIxlpAPZemV/Ua7gRoch/CuzfgDPnmS1PUtV4QiCPNKlZ+AJJ2FFOjhFBwou5iT9F3HJDpzGNgtUN21gPokpCv2GcWysdgIdovNYm75gTSLntG2XZ78hdA0rkN/OUJDK6Vl2RKw=
distributions: sdist bdist_wheel
skip_existing: true
on:
tags: true
# Daily website deployment stage is triggered via cron job.
- stage: Deploy Latest Website And Upload To Test PyPI (Daily)
python: "3.7"
install:
- pip install psycopg2 # Used in example DBSettings in a tutorial (as part of postgres).
- pip install git+https://github.com/cornellius-gp/gpytorch.git
- pip install git+https://github.com/pytorch/botorch.git
- pip install -q -e .[dev,mysql,notebook]
- pip install torchvision # required for tutorials
- pip install ray # Required for building RayTune tutorial notebook.
- pip install tabulate # Required for building RayTune tutorial notebook.
git:
depth: false
script:
- travis_wait 90 bash scripts/publish_site.sh -d
# Uploading to test.pypi to check that deployment works.
deploy:
provider: pypi
server: https://test.pypi.org/legacy/
distributions: sdist bdist_wheel
user: drfreund
password:
secure: P9hrA5CEpcY7pa+GA7c9VvRPrsIcSEMyD1zRsJe80SkXK7UZ6cDIuGcFsbz7Gsahp+xfMXeeY/JKrp0E/5bvm6X5RmHS2kex8OrULVJaGcenE7BS4OwwJEANhMFDemGhAg5rAJUIYSU4jn9e2fChVaomerHpFYDWG9ojfm9okv2s1qtjF7DQzJDm2h8vgs1xH8UUswt7AUQsKXwwjtaN1EgwRLOHgStusu7Ynujx8MeluSgO2DVME6nakWBAfzvMtsp7OBpY8DBf9FdnhPwQd00PUmO5A+FVOeUcp8Hq+6IHP3Z1SXXXZ8njVwYJ2AtnBF0aFMvQoYGHtD7l5+pNwziWbtvoTi+iYDU+5uJNH5eSx63ZkQOMpe6CMKSMjT6XdeCaHvjR0639ssdOfHHKv/ygmKLJ+h8NArMAOVeP/1JaZDM+X46o5gg1io1FjcghWdQOYD5zM9Dhirl2knwVYek3gYQmXjsl4uKXzfGeKWJ/fvP54ANV8FL3E8dC5TOC9S4IBiFpEcmnvxn6F+YwxhgDI0xB0mjKhGlCqxl/kqiXjLLD3C4b6gpjsQO2bdBilBnWMR+HHScx0OqQXGevA/ANlqAurMiU9loPUrPjTweRZPwpKHYMfZXPzGDj2B/oej/mqFE4I1rRA86OcFZurD1I8KFHZ08Jq4mJmf8MYfI=
skip_existing: true
on:
branch: master
tags: false
python: 3.7
stages:
- name: Test
- name: Pre-deploy
if: tag IS present
- name: Deploy Version Website + deploy to PyPI (On Release)
if: tag IS present
- name: Deploy Latest Website And Upload To Test PyPI (Daily)
# require the branch name to be master & only build daily
if: branch = master AND type = cron
after_success:
- bash <(curl -s https://codecov.io/bash)