forked from tqdm/tqdm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
227 lines (227 loc) · 5.63 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
language: python
env:
global:
- PIP_CACHE_DIR="$HOME/.cache/pip" # unify pip cache location for all platforms
# use cache for big builds like pandas (to minimise build time).
# If issues, clear cache
# https://docs.travis-ci.com/user/caching/#Clearing-Caches
cache:
pip: true
directories:
- $HOME/.cache/pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
notifications:
email: false
# branches: # remove travis double-check on pull requests in main repo
# only:
# - master
# - /^\d\.\d+$/
stages:
- check
- test
- name: deploy
if: repo = tqdm/tqdm AND NOT type = pull_request
- name: development
if: false
jobs:
allow_failures:
- stage: development
include:
- stage: test
name: py2.6
python: 2.6
env: TOXENV=py26
dist: trusty
- name: py2.7
python: 2.7
env: TOXENV=py27
- name: py3.4
python: 3.4
env: TOXENV=py34
- name: py3.5
python: 3.5
env: TOXENV=py35
- name: py3.6
python: 3.6
env: TOXENV=py36
- name: py3.7
python: 3.7
env: TOXENV=py37
- name: tf-no-keras
python: 3.7
env: TOXENV=tf-no-keras
- name: pypy2.7
python: pypy2.7-5.10.0
env: TOXENV=pypy
- name: pypy3.5
python: pypy3.5-5.10.0
env: TOXENV=pypy3
- stage: development
name: py2.7-win
os: windows
language: shell
env: TOXENV=py27
before_install: &before_install_win
- |
if [[ "$TOXENV" == "py37" ]]; then
choco install python --version 3.7.4
export PATH="/c/Python37:/c/Python37/Scripts:$PATH"
else
choco install python2
export PATH="/c/Python27:/c/Python27/Scripts:$PATH"
fi
- python -m pip install -U pip setuptools wheel
install: &install_win
- python -m pip install tox
- python -m pip install .
script: &script_win
- python -m tox
- name: py3.7-win
os: windows
language: shell
env: TOXENV=py37
before_install: *before_install_win
install: *install_win
script: *script_win
- name: py2.7-osx
os: osx
language: shell
env: TOXENV=py27
- name: py3.7-osx
os: osx
osx_image: xcode11.2 # py3.7
language: shell
env: TOXENV=py37
- stage: check
name: style
python: 3.7
env: TOXENV=flake8
- name: setup
python: 3.7
env: TOXENV=setup.py
- name: perf
python: 3.7
env: TOXENV=perf
- stage: deploy
name: PyPI and GitHub
python: 3.7
addons:
apt:
packages:
- pandoc
install:
script:
- pip install .[dev]
- make build
#- make submodules
#- cd wiki && make && cd ..
- openssl aes-256-cbc -K $encrypted_a6d6301302b7_key
-iv $encrypted_a6d6301302b7_iv -in .meta/.tqdm.gpg.enc -out .tqdm.gpg -d
- gpg --import .tqdm.gpg
- rm .tqdm.gpg
- git log --pretty='format:- %s%n%b---' $(git tag --sort=creatordate | tail -n2 | head -n1)..HEAD > CHANGES.md
deploy:
- provider: script
script: twine upload -s -i [email protected] dist/tqdm-*
skip_cleanup: true
on:
tags: true
- provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: dist/tqdm-*.whl*
skip_cleanup: true
draft: true
name: tqdm $TRAVIS_TAG stable
edge: true
tag_name: $TRAVIS_TAG
target_commitish: $TRAVIS_COMMIT
release_notes_file: CHANGES.md
on:
tags: true
- name: docker
python: 3.7
services:
- docker
install:
script:
- echo "$DOCKER_PWD" | docker login -u $DOCKER_USR --password-stdin
- echo "$GITHUB_TOKEN" | docker login docker.pkg.github.com -u $GITHUB_USR --password-stdin
- make -B docker
- |
if [[ -n "$TRAVIS_TAG" ]]; then
docker tag tqdm/tqdm:latest tqdm/tqdm:${TRAVIS_TAG#v}
docker tag tqdm/tqdm:latest docker.pkg.github.com/tqdm/tqdm/tqdm:${TRAVIS_TAG#v} ; fi
- docker tag tqdm/tqdm:latest tqdm/tqdm:devel
- docker tag tqdm/tqdm:latest docker.pkg.github.com/tqdm/tqdm/tqdm:latest
- docker tag tqdm/tqdm:latest docker.pkg.github.com/tqdm/tqdm/tqdm:devel
deploy:
- provider: script
script: docker push tqdm/tqdm:${TRAVIS_TAG#v}
on:
tags: true
- provider: script
script: 'docker push docker.pkg.github.com/tqdm/tqdm/tqdm:${TRAVIS_TAG#v} || :'
on:
tags: true
- provider: script
script: docker push tqdm/tqdm:latest
- provider: script
script: 'docker push docker.pkg.github.com/tqdm/tqdm/tqdm:latest || :'
- provider: script
script: docker push tqdm/tqdm:devel
on:
branch: devel
- provider: script
script: 'docker push docker.pkg.github.com/tqdm/tqdm/tqdm:devel || :'
on:
branch: devel
- name: snap
python: 3.7
addons:
snaps:
- name: snapcraft
channel: stable
confinement: classic
- name: lxd
channel: stable
env:
- SNAPCRAFT_IMAGE_INFO: '{"build_url": "$TRAVIS_BUILD_URL"}'
before_install:
- sudo /snap/bin/lxd.migrate -yes
- sudo /snap/bin/lxd waitready
- sudo /snap/bin/lxd init --auto
install:
- make snapcraft.yaml
script:
- sudo snapcraft --use-lxd
after_failure:
- sudo journalctl -u snapd
deploy:
- provider: snap
snap: tqdm*.snap
channel: stable
skip_cleanup: true
on:
tags: true
- provider: snap
snap: tqdm*.snap
channel: candidate
skip_cleanup: true
- provider: snap
snap: tqdm*.snap
channel: edge
skip_cleanup: true
on:
branch: devel
before_install:
# fix a crash with multiprocessing on Travis
# - sudo rm -rf /dev/shm
# - sudo ln -s /run/shm /dev/shm
- git fetch --tags
install:
- pip install tox
- pip install .
script:
- tox