-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
.travis.yml
143 lines (143 loc) · 3.64 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
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
jobs:
include:
- 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: pypy2.7
python: pypy2.7-5.10.0
env: TOXENV=pypy
- name: pypy3.5
python: pypy3.5-5.10.0
env: TOXENV=pypy3
- name: style
stage: check
python: 3.6
env: TOXENV=flake8
- name: setup
stage: check
python: 3.6
env: TOXENV=setup.py
- name: perf
python: 3.6
env: TOXENV=perf
- name: PyPI and GitHub
stage: deploy
python: 3.7
dist: xenial
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 tqdm@caspersci.uk.to dist/tqdm-*
cleanup: false
on:
tags: true
- provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: dist/tqdm-*.whl*
cleanup: false
draft: true
name: tqdm $TRAVIS_TAG stable
edge: true
release_notes_file: CHANGES.md
on:
tags: true
- name: docker
stage: deploy
python: 3.7
dist: xenial
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
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