forked from napari/napari
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
269 lines (222 loc) · 7.78 KB
/
.cirrus.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
269
# default container
container:
image: python:3.8
black_task:
auto_cancellation: true
name: Black Formatting
install_script:
- python -m pip install --retries 3 --upgrade pip
- pip install `cat requirements/development.txt | grep black`
test_script:
- black --check .
lint_task:
auto_cancellation: true
name: Flake8 Linting
install_script:
- python -m pip install --retries 3 --upgrade pip
- pip install `cat requirements/development.txt | grep flake8`
test_script:
- flake8 napari
linux_task:
auto_cancellation: true
matrix:
env:
PY_VER: "3.6"
PYTEST_FLAGS: ""
env:
PY_VER: "3.7"
PYTEST_FLAGS: ""
env:
PY_VER: "3.8"
PYTEST_FLAGS: ""
env:
PY_VER: "3.8"
NAPARI_PERFMON: "1"
PYTEST_FLAGS: "--perfmon-only"
name: linux ${PY_VER}
container:
image: gcc:latest
env:
PATH: $HOME/conda/bin:$PATH
DISPLAY: ":99"
CODECOV_TOKEN: ENCRYPTED[be41b51dac12576cfe9889ddd604d1f9db97cee5db0d98f7241fc8d5adf8d23da1135cd67e20b2ecec4005ac03083286]
system_script:
- apt-get update
- apt-get install -y libgl1-mesa-glx xvfb libqt5x11extras5 herbstluftwm
conda_script:
- curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh > install.sh
- bash install.sh -b -p $HOME/conda
# https://github.com/napari/napari/pull/594#issuecomment-542475164
- conda install --yes -c conda-forge setuptools
- conda install -y -n base conda=4.8.3
- conda install -y python=$PY_VER
# https://github.com/cirruslabs/cirrus-ci-docs/issues/97
xvfb_start_background_script: Xvfb $DISPLAY -ac -screen 0 1024x768x24
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#xvfb-assertionerror-timeouterror-when-using-waituntil-waitexposed-and-ui-events
herbstluftwm_start_background_script: herbstluftwm
pip_cache:
folder: ~/.cache/pip
fingerprint_script:
- echo $PYTHON_VERSION
- cat requirements/test.txt
populate_script:
- python -m pip install --retries 3 --upgrade pip
- python -m pip install --retries 3 -r requirements/test.txt
install_script:
- python -m pip install --retries 3 --upgrade pip
- python -m pip install --retries 3 -r requirements/test.txt
- python -m pip install --retries 3 pytest-cov codecov
- python -m pip install -e .[pyside2]
check_script:
- conda list
- python -c "import napari; print(napari.__version__)"
test_pyside2_with_coverage_script: |
if [[ $PYTEST_FLAGS == "" ]]; then
pytest -v --cov-report=xml --cov=./napari
codecov
fi;
test_pyqt5_script:
- python -m pip uninstall -y pyside2
- python -m pip install -e .[pyqt5]
- pytest napari -v $PYTEST_FLAGS
mac_task:
auto_cancellation: true
matrix:
# not a pull request: run full suite
- only_if: $CIRRUS_PR == ""
env:
matrix:
PY_VER: "3.6"
PY_VER: "3.7"
PY_VER: "3.8"
# is a pull request, only run python 3.8
- only_if: $CIRRUS_PR != ""
env:
PY_VER: "3.8"
name: macos ${PY_VER}
osx_instance:
image: catalina-xcode
env:
PATH: $HOME/conda/bin:$PATH
conda_script:
- curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh > install.sh
- bash install.sh -b -p $HOME/conda
# https://github.com/napari/napari/pull/594#issuecomment-542475164
- conda install --yes -c conda-forge setuptools
- conda install -y -n base conda=4.8.3
- conda install -y python=$PY_VER
pip_cache:
folder: $HOME/Library/Caches/pip
fingerprint_script:
- echo $PYTHON_VERSION
- cat requirements/test.txt
populate_script:
- export MACOSX_DEPLOYMENT_TARGET=10.10
- python -m pip install --retries 3 --upgrade pip
- python -m pip install --retries 3 -r requirements/test.txt
install_script:
- python -m pip install --retries 3 --upgrade pip
- python -m pip install --retries 3 -r requirements/test.txt
- python -m pip install -e .[pyside2]
check_script:
- conda list
- python -c "import napari; print(napari.__version__)"
test_script: pytest -v
win_task:
auto_cancellation: true
matrix:
# not a pull request: run full suite
- only_if: $CIRRUS_PR == ""
env:
matrix:
PY_VER: "3.6"
PY_VER: "3.7"
PY_VER: "3.8"
# is a pull request, only run python 3.8
- only_if: $CIRRUS_PR != ""
env:
PY_VER: "3.8"
name: windows ${PY_VER}
windows_container:
image: cirrusci/windowsservercore:cmake
os_version: 2019
env:
ANACONDA_LOCATION: $USERPROFILE\anaconda
PATH: $ANACONDA_LOCATION\Scripts;$ANACONDA_LOCATION;$PATH
# must set this to its default since it doesn't work in env variables
# see https://github.com/cirruslabs/cirrus-ci-docs/issues/423
CIRRUS_WORKING_DIR: C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build
# https://github.com/vispy/vispy/blob/v0.5.3/appveyor.yml#L44
VISPY_GL_LIB: $CIRRUS_WORKING_DIR\opengl32.dll
PYTHON_ARCH: 64
system_script:
# install OpenSSL
- choco install -y openssl.light
# install OpenGL
- ps: Invoke-RestMethod -Uri https://raw.githubusercontent.com/vispy/vispy/v0.5.3/make/install_opengl.ps1 -Method Get -OutFile opengl.ps1
- powershell ./opengl.ps1
- ps: rm opengl.ps1
conda_script:
- choco install -y miniconda3 --params="'/D:%ANACONDA_LOCATION%'"
# https://github.com/napari/napari/pull/594#issuecomment-542475164
- conda install --yes -c conda-forge setuptools
- conda install -y -n base conda=4.8.3
- conda install -y python=%PY_VER%
pip_cache:
folder: $LOCALAPPDATA\pip\Cache
fingerprint_script:
- echo $PYTHON_VERSION
- type requirements\test.txt
populate_script:
- python -m pip install --retries 3 --upgrade pip
- python -m pip install --retries 3 -r requirements/test.txt
install_script:
- python -m pip install --retries 3 --upgrade pip
- python -m pip install --retries 3 -r requirements/test.txt
- python -m pip install -e .[pyside2]
check_script:
- conda list
- python -c "import napari; print(napari.__version__)"
test_script: pytest -v -o qt_no_exception_capture=1
check_manifest_task:
auto_cancellation: true
name: Check Manifest
depends_on:
- linux 3.8
- macos 3.8
- windows 3.8
install_script:
- python -m pip install --retries 3 --upgrade pip
- python -m pip install --retries 3 check-manifest
test_script:
- check-manifest
push_docs_task:
auto_cancellation: true
only_if: $CIRRUS_BRANCH == "master"
env:
GH_REF: github.com/napari/docs
GH_TOKEN: ENCRYPTED[bdbe1e34c8f2491f4c982798ed4bb5bfe61da8ecb1d7c5164bd97f6fccaa398818d2b788badd13651d8e1692cab10fec]
CIRRUS_CLONE_DEPTH: 0 # unlimited depth allows versioneer to work properly
system_script: |
apt-get update
apt-get install -y libgl1-mesa-glx libqt5x11extras5
install_script: |
git fetch --tags
python -m pip install --retries 3 --upgrade pip
python -m pip install --retries 3 -e ".[all]"
python -m pip install --retries 3 -r requirements/docs.txt
build_script: make docs
push_script:
# adapted from https://github.com/scikit-image/scikit-image/blob/master/tools/travis/deploy_docs.sh
- VERSION=`python -c "import napari; print(napari.__version__)"`
- git clone --quiet https://${GH_REF} doc_repo
- cd doc_repo
- git config --global user.email "[email protected]"
- git config --global user.name "Cirrus Bot"
- git rm -rq .
- cp -r ../docs/build/html/* .
- touch .nojekyll
- git add .
- if [[ -z $(git status --untracked-files=no --porcelain) ]]; then exit 0; fi # repo is clean
- git commit -m "dev docs v${VERSION}"
- git push --quiet "https://${GH_TOKEN}@${GH_REF}" master > /dev/null 2>&1