-
Notifications
You must be signed in to change notification settings - Fork 31
/
.travis.yml
268 lines (237 loc) · 7.85 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
dist: xenial
language: python
git:
depth: false
branches:
except:
- gh-pages
cache:
directories:
- "$HOME/.cache/pip"
- "$HOME/.pyenv"
- "$HOME/.tox"
stages:
- test
- build
- name: deploy
if: (repo = PIQuIL/QuCumber) AND (tag IS present)
jobs:
fast_finish: true
allow_failures:
- env: TORCH="nightly"
include:
- stage: test
os: linux
python: 3.6
env:
- TORCH="1.9"
install: &test-install
- travis_retry pip install tox-travis codecov
script: &test-script
- echo 'Running tests...'
- if [[ $TRAVIS_BRANCH != "master" ]]; then tox -- -s -m 'not slow and not extra' -n auto; fi # don't run slow/extra tests if not on master branch
- if [[ $TRAVIS_BRANCH == "master" ]]; then tox -- -s --cov=qucumber --no-cov-on-fail -n auto; fi
after_success: codecov
- python: 3.7
env: TORCH="1.9"
install: *test-install
script: *test-script
after_success: codecov
- python: 3.8
env: TORCH="2.0"
install: *test-install
script: *test-script
after_success: codecov
- python: 3.9
env: TORCH="2.0"
install: *test-install
script: *test-script
after_success: codecov
- python: 3.10
env: TORCH="2.0"
install: *test-install
script: *test-script
after_success: codecov
- python: 3.11
env: TORCH="2.0"
install: *test-install
script: *test-script
after_success: codecov
- os: linux
name: "Documentation Format and Style Tests"
python: 3.6
addons:
apt:
packages:
- libenchant1c2a
- pandoc
install: travis_retry pip install -e .[style,docs]
script:
- inv style
- make -C ./docs -e test
- make -C ./docs -e spelling
- make -C ./docs -e linkcheck
####### misc extra configs
####### only test on python 3.6, if it works there it should work on 3.7 and 3.8
- python: 3.6
env: TORCH="1.2"
install: *test-install
script: *test-script
after_success: codecov
if: branch = master
- python: 3.6
env: TORCH="1.3"
install: *test-install
script: *test-script
after_success: codecov
if: branch = master
- python: 3.6
env: TORCH="1.4"
install: *test-install
script: *test-script
after_success: codecov
if: branch = master
- python: 3.6
env: TORCH="1.5"
install: *test-install
script: *test-script
after_success: codecov
if: branch = master
- python: 3.6
env: TORCH="1.6"
install: *test-install
script: *test-script
after_success: codecov
if: branch = master
- python: 3.6
env: TORCH="1.7"
install: *test-install
script: *test-script
after_success: codecov
if: branch = master
- python: 3.6
env: TORCH="1.8"
install: *test-install
script: *test-script
after_success: codecov
if: branch = master
- python: 3.6
env: TORCH="1.9"
install: *test-install
script: *test-script
after_success: codecov
if: branch = master
- python: 3.10
env: TORCH="nightly"
install: *test-install
script: *test-script
after_success: codecov
if: branch = master
### end of extra configs
# only test against most recent version of PyTorch on macOS
# if all versions of torch work on linux, they should work on macOS
# otherwise it's PyTorch's issue, not ours
- os: osx
osx_image: xcode12.2
name: "Python 3.6"
language: objective-c
env:
- TORCH="1.9"
- PYENV_VERSION=3.6.9
- PY_TAG='py36'
before_install: &mac-install
- mkdir -p $HOME/.matplotlib/
- "echo backend : TkAgg > $HOME/.matplotlib/matplotlibrc"
- brew install libomp
- brew update && brew upgrade pyenv
- eval "$(pyenv init -)"
- travis_retry pyenv install -s $PYENV_VERSION
- pyenv global $PYENV_VERSION
- pyenv rehash
- pip -V
install: *test-install
script: &mac-test
- echo 'Running tests...'
- if [[ $TRAVIS_BRANCH != "master" ]]; then travis_wait tox -- -s -m 'not slow and not extra' -n auto; fi # don't run slow/extra tests if not on master branch
- if [[ $TRAVIS_BRANCH == "master" ]]; then travis_wait tox -- -s --cov=qucumber --no-cov-on-fail -n auto; fi
after_success: codecov
- os: osx
osx_image: xcode12.2
name: "Python 3.7"
language: objective-c
env:
- TORCH="1.9"
- PYENV_VERSION=3.7.5
- PY_TAG='py37'
before_install: *mac-install
install: *test-install
script: *mac-test
after_success: codecov
- os: osx
osx_image: xcode12.2
name: "Python 3.8"
language: objective-c
env:
- TORCH="2.0"
- PYENV_VERSION=3.8.0
- PY_TAG='py38'
before_install: *mac-install
install: *test-install
script: *mac-test
after_success: codecov
- stage: build
name: "Test Package Locally"
os: linux
python: 3.6
script:
# make sure there arent any accidental dependencies on misc repo files
- python setup.py bdist_wheel
- find . ! -name 'dist' ! -name '.' ! -name '..' -type d -exec rm -rf {} +
- find . ! -name '*.whl' -type f -exec rm -f {} +
- ls -a
- ls -a dist
- cd dist; pip install *.whl
- stage: deploy
name: "GitHub Release - Examples"
os: linux
python: 3.6
script:
- tar -czvf examples.tar.gz examples
- zip -r examples.zip examples
deploy: &gh-releases
provider: releases
cleanup: false
token: "$GITHUB_TOKEN"
file:
- examples.tar.gz
- examples.zip
file_glob: true
on:
repo: PIQuIL/QuCumber
branch: master
tags: true
- name: "GitHub Release - Package Source Distribution"
script: python setup.py sdist bdist_wheel
os: linux
python: 3.6
deploy:
<<: *gh-releases
file:
- dist/*.tar.gz
- dist/*.whl
- name: "PyPI"
script: skip
deploy:
provider: pypi
skip_existing: true
distributions: "sdist bdist_wheel"
username: PIQuIL
password:
secure: ANzomjrVPkzLO7MG9Zekl1Tz/GiO6rJyqZSWlWxF5a8M0+ZBJsFb7Do6kxPNulkEFwEnvjnJpzpY2ryWlhrXnz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