forked from pex-tool/pex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
200 lines (169 loc) · 5.13 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
x-pyenv-shard: &x-pyenv-shard
language: generic
env: &env >
PYENV_ROOT="${HOME}/.pyenv_pex"
PATH="${PYENV_ROOT}/shims:${PATH}"
cache: &cache
# The default is 3 minutes (180).
timeout: 300
directories:
- .pyenv_test
- "${PYENV_ROOT}"
install: |
PYENV="${PYENV_ROOT}/bin/pyenv"
if [ ! -x "${PYENV}" ]; then
rm -rf ${PYENV_ROOT}
git clone https://github.com/pyenv/pyenv "${PYENV_ROOT}";
fi
"${PYENV}" install --keep --skip-existing ${PYENV_VERSION}
"${PYENV}" global ${PYENV_VERSION}
pip install -U tox "setuptools>=36"
x-py27: &x-py27 PYENV_VERSION=2.7.15
x-py37: &x-py37 PYENV_VERSION=3.7.0
x-pypy: &x-pypy PYENV_VERSION=pypy2.7-6.0.0
x-linux-shard: &x-linux-shard
<<: *x-pyenv-shard
os: linux
sudo: false
dist: trusty
x-linux-27-shard: &x-linux-27-shard
<<: *x-linux-shard
env:
- *env
- *x-py27
x-linux-pypy-shard: &x-linux-pypy-shard
<<: *x-linux-shard
env:
- *env
- *x-pypy
# Python 3.7 requires at least OpenSSL 1.0.2:
# https://docs.python.org/3/whatsnew/3.7.html#platform-support-removals.
# Travis' `trusty` image does not get us there and, at the time of writing, the beta `xenial`
# distribution is not generally available. As such, we install and activate a custom OpenSSL
# here - the latest 1.0.2 version at the time of writing.
x-linux-37-shard: &x-linux-37-shard
<<: *x-linux-shard
addons:
apt:
packages:
# Even though we install our own, it does not ship with a root CA store, so we ensure one
# here at /usr/lib/ssl/certs and activate it by exporting SSL_CERT_DIR which OpenSSL knows
# how to read.
- openssl
env:
- *env
- *x-py37
- OPENSSL_VERSION=1.0.2p
- OPENSSL_DIR="${HOME}/.pyenv_pex_openssl"
- LD_LIBRARY_PATH="${OPENSSL_DIR}/lib"
- SSL_CERT_DIR=/usr/lib/ssl/certs
- PYTHON_CONFIGURE_OPTS="--with-openssl=${OPENSSL_DIR}"
- TOX_TESTENV_PASSENV=SSL_CERT_DIR
cache:
<<: *cache
directories:
- .pyenv_test
- "${PYENV_ROOT}"
- "${OPENSSL_DIR}"
before_install: |
if [ ! -f "${OPENSSL_DIR}/installed-${OPENSSL_VERSION}" ]; then
rm -rf "${OPENSSL_DIR}"
curl https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz | tar -xz
(
cd openssl-${OPENSSL_VERSION}
./config shared --prefix="${OPENSSL_DIR}"
make
make install
)
touch "${OPENSSL_DIR}/installed-${OPENSSL_VERSION}"
fi
x-osx-shard: &x-osx-shard
<<: *x-pyenv-shard
os: osx
osx_image: xcode9.4
x-osx-ssl: &x-osx-ssl >
CPPFLAGS=-I/usr/local/opt/openssl/include
LDFLAGS=-L/usr/local/opt/openssl/lib
x-osx-27-shard: &x-osx-27-shard
<<: *x-osx-shard
env:
- *env
- *x-py27
- *x-osx-ssl
x-osx-37-shard: &x-osx-37-shard
<<: *x-osx-shard
env:
- *env
- *x-py37
- *x-osx-ssl
# NB: Travis partitions caches using a combination of os, language amd env vars. As such, we do not
# use TOXENV and instead pass the toxenv via -e on the command line. This helps ensure we share
# caches as much as possible (eg: all linux python 2.7.15 shards share a cache).
matrix:
include:
- <<: *x-linux-27-shard
name: TOXENV=style
script: tox -v -e style
- <<: *x-linux-27-shard
name: TOXENV=isort-check
script: tox -v -e isort-check
- <<: *x-linux-27-shard
name: TOXENV=vendor-check
script: tox -v -e vendor-check
- <<: *x-linux-27-shard
name: TOXENV=py27
script: tox -v -e py27
- <<: *x-linux-27-shard
name: TOXENV=py27-subprocess
script: tox -v -e py27-subprocess
- <<: *x-linux-27-shard
name: TOXENV=py27-requests
script: tox -v -e py27-requests
- <<: *x-linux-27-shard
name: TOXENV=py27-requests-cachecontrol
script: tox -v -e py27-requests-cachecontrol
- <<: *x-linux-shard
name: TOXENV=py35
env:
- *env
- PYENV_VERSION=3.5.6
script: tox -v -e py35
- <<: *x-linux-shard
name: TOXENV=py36
env:
- *env
- PYENV_VERSION=3.6.6
script: tox -v -e py36
- <<: *x-linux-37-shard
name: TOXENV=py37
script: tox -v -e py37
- <<: *x-linux-37-shard
name: TOXENV=py37-requests
script: tox -v -e py37-requests
- <<: *x-linux-37-shard
name: TOXENV=py37-requests-cachecontrol
script: tox -v -e py37-requests-cachecontrol
- <<: *x-linux-pypy-shard
name: TOXENV=pypy
script: tox -v -e pypy
- <<: *x-linux-27-shard
name: TOXENV=py27-integration
script: tox -v -e py27-integration
- <<: *x-linux-37-shard
name: TOXENV=py37-integration
script: tox -v -e py37-integration
- <<: *x-linux-pypy-shard
name: TOXENV=pypy-integration
script: tox -v -e pypy-integration
- <<: *x-osx-27-shard
name: TOXENV=py27-requests
script: tox -v -e py27-requests
- <<: *x-osx-37-shard
name: TOXENV=py37-requests
script: tox -v -e py37-requests
- <<: *x-osx-27-shard
name: TOXENV=py27-integration
script: tox -v -e py27-integration
- <<: *x-osx-37-shard
name: TOXENV=py37-integration
script: tox -v -e py37-integration