forked from cleanlab/cleanlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
160 lines (157 loc) · 7.22 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
language: python
# ====== Linux =========
os:
- linux
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "3.7"
# Install dependencies
before_install:
- python --version
- pip install -U -q pip
- pip install -U -q pytest
- pip install -q pytest-cov
- pip install -q tox-travis
- pip install -q -r requirements.txt
# Set-up for macOS and Windows and Linux
matrix:
include:
# ====== macOS =========
- name: "Python 2.7.14 on macOS 10.13"
os: osx
osx_image: xcode9.3 # Python 2.7.14_2 running on macOS 10.13
language: shell # 'language: python' errors on Travis CI macOS
before_install:
- python --version
- pip install -U -q pytest --user
- pip install -q pytest-cov --user
- pip install -q tox-travis --user
- pip install -q future --user # Needed for pytorch in python 2.7
- pip install -q -r requirements.txt --user
install:
- pip install -q torch torchvision --user
- pip install -q -e . --user
script: python -m pytest --verbose --cov=cleanlab/ --cov-config .coveragerc_py27
- name: "Python 3.6.5 on macOS 10.13"
os: osx
osx_image: xcode9.4 # Python 3.6.5 running on macOS 10.13
language: shell # 'language: python' is an error on Travis CI macOS
before_install:
- python --version
- pip3 install -U -q pip
- pip3 install -U -q pytest
- pip3 install -q pytest-cov
- pip3 install -q tox-travis
- pip3 install -q -r requirements.txt
install:
- pip install -q torch torchvision
- pip3 install -q -e .
script: pytest --verbose --cov=cleanlab/ --cov-config .coveragerc_py3
- name: "Python 3.7.3 on macOS 10.13"
os: osx
osx_image: xcode10.2 # Python 3.7.3 running on macOS 10.13
language: shell # 'language: python' is an error on Travis CI macOS
before_install:
- python --version
- pip3 install -U -q pip
- pip3 install -U -q pytest
- pip3 install -q pytest-cov
- pip3 install -q tox-travis
- pip3 install -q -r requirements.txt
install:
- pip install -q torch torchvision
- pip3 install -q -e .
script: pytest --verbose --cov=cleanlab/ --cov-config .coveragerc_py3
# ====== WINDOWS =========
- name: "Python 2.7 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' errors Travis CI Windows
before_install:
- choco install python2
- python --version
- python -m pip install --upgrade pip
- pip install --upgrade pytest
- pip install -q pytest-cov
- pip install -q tox-travis
- pip install -q future # Needed for pytorch in python 2.7
- pip install -q -r requirements.txt
env: PATH=/c/Python27:/c/Python27/Scripts:$PATH
install:
# Windows python 2.7 has issues with pytorch. Do not install.
# - pip install -q https://download.pytorch.org/whl/cpu/torch_stable.html
# - pip install torchvision
- pip install -q -e .
script: pytest --verbose --cov=cleanlab/ --cov-config .coveragerc_py27
- name: "Python 3.5.4 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows
before_install:
- choco install python --version 3.5.4
- python --version
- python -m pip install --upgrade pip
- pip3 install --upgrade pytest
- pip3 install -q pytest-cov
- pip3 install -q tox-travis
- pip3 install -q -r requirements.txt
install:
- pip3 install -q torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
- pip3 install -q -e .
env: PATH=/c/Python35:/c/Python35/Scripts:$PATH
script: pytest --verbose --cov=cleanlab/ --cov-config .coveragerc_py3
- name: "Python 3.6.8 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows
before_install:
- choco install python --version 3.6.8
- python --version
- python -m pip install --upgrade pip
- pip3 install --upgrade pytest
- pip3 install -q pytest-cov
- pip3 install -q tox-travis
- pip3 install -q -r requirements.txt
env: PATH=/c/Python36:/c/Python36/Scripts:$PATH
install:
- pip3 install -q torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
- pip3 install -q -e .
script: pytest --verbose --cov=cleanlab/ --cov-config .coveragerc_py3
- name: "Python 3.7.4 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows
before_install:
- choco install python --version 3.7.4
- python --version
- python -m pip install --upgrade pip
- pip3 install --upgrade pytest
- pip3 install -q pytest-cov
- pip3 install -q tox-travis
- pip3 install -q -r requirements.txt
env: PATH=/c/Python37:/c/Python37/Scripts:$PATH
install:
- pip3 install -q torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
- pip3 install -q -e .
script: pytest --verbose --cov=cleanlab/ --cov-config .coveragerc_py3
# Install cleanlab, pytorch, torchvision.
install:
# For testing cleanlab.models
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install -q https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp27-cp27mu-linux_x86_64.whl; fi
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install -q future; fi # Needed for pytorch in python 2.7
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then pip3 install -q https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp35-cp35m-linux_x86_64.whl; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then pip3 install -q https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp36-cp36m-linux_x86_64.whl; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]]; then pip3 install -q https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp37-cp37m-linux_x86_64.whl; fi
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install -q torchvision --no-cache-dir; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then pip install -q torchvision; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then pip install -q torchvision; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]]; then pip install -q torchvision; fi
# - if [[ $TRAVIS_PYTHON_VERSION == 3.4 ]]; then git clone -q https://github.com/facebookresearch/fastText.git && pip install -q -e fastText/.; fi
# - if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then git clone -q https://github.com/facebookresearch/fastText.git && pip install -q -e fastText/.; fi
# - if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then git clone -q https://github.com/facebookresearch/fastText.git && pip install -q -e fastText/.; fi
- pip install -q -e .
# Runs tox in bash. Tox will run tox.ini.
script:
- tox
# After success upload results to code coverage.
after_success:
- bash <(curl -s https://codecov.io/bash) -t c1817983-8176-4535-b31d-9fa9d649438a