-
Notifications
You must be signed in to change notification settings - Fork 25
/
.travis.yml
289 lines (252 loc) · 7.19 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
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# Control file for Travis CI (http://travis-ci.org)
# Must be located in the root directory of the Git repository.
# By default, notification emails are sent to the PR creator and commiter.
notifications:
email: false
# We define the job matrix explicitly, in order to have a minimum number of
# useful combinations. The disabled combinations will be enabled in a specific
# branch that does not run for every change.
jobs:
include:
- os: linux
language: python
python: "2.7"
env:
- PACKAGE_LEVEL=minimum
cache: pip
- os: linux
language: python
python: "2.7"
env:
- PACKAGE_LEVEL=latest
cache: pip
# - os: linux
# language: python
# python: "3.4"
# env:
# - PACKAGE_LEVEL=minimum
# cache: pip
- os: linux
language: python
python: "3.4"
env:
- PACKAGE_LEVEL=latest
cache: pip
# - os: linux
# language: python
# python: "3.5"
# env:
# - PACKAGE_LEVEL=minimum
# cache: pip
# - os: linux
# language: python
# python: "3.5"
# env:
# - PACKAGE_LEVEL=latest
# cache: pip
# - os: linux
# language: python
# python: "3.6"
# env:
# - PACKAGE_LEVEL=minimum
# cache: pip
# - os: linux
# language: python
# python: "3.6"
# env:
# - PACKAGE_LEVEL=latest
# cache: pip
# - os: linux
# dist: xenial
# language: python
# python: "3.7"
# env:
# - PACKAGE_LEVEL=minimum
# cache: pip
# - os: linux
# dist: xenial
# language: python
# python: "3.7"
# env:
# - PACKAGE_LEVEL=latest
# cache: pip
- os: linux
dist: xenial
language: python
python: "3.8"
env:
- PACKAGE_LEVEL=minimum
cache: pip
- os: linux
dist: xenial
language: python
python: "3.8"
env:
- PACKAGE_LEVEL=latest
cache: pip
# - os: linux
# language: python
# python: "pypy" # currently Python 2.7.13, PyPy 7.1.1
# env:
# - PACKAGE_LEVEL=minimum
# - os: linux
# language: python
# python: "pypy" # currently Python 2.7.13, PyPy 7.1.1
# env:
# - PACKAGE_LEVEL=latest
# - os: linux
# language: python
# python: "pypy3" # currently Python 3.6.1, PyPy 7.1.1-beta0
# env:
# - PACKAGE_LEVEL=minimum
# - os: linux
# language: python
# python: "pypy3" # currently Python 3.6.1, PyPy 7.1.1-beta0
# env:
# - PACKAGE_LEVEL=latest
# - os: osx
# language: generic
# python:
# env:
# - PACKAGE_LEVEL=minimum
# - PYTHON=2
# cache: pip
# - os: osx
# language: generic
# python:
# env:
# - PACKAGE_LEVEL=latest
# - PYTHON=2
# cache: pip
# - os: osx
# language: generic
# python:
# env:
# - PACKAGE_LEVEL=minimum
# - PYTHON=3
# cache: pip
# - os: osx
# language: generic
# python:
# env:
# - PACKAGE_LEVEL=latest
# - PYTHON=3
# cache: pip
# Note: The public Travis specifies the CPU architecture via 'arch', while
# Travis@IBM still specifies it via 'os'. Because Travis@IBM does not
# show the CPU architecture in the build listing, we set an ARCH variable
# to show that in the build listing (it is not used otherwise).
# Note: So far it is not possible to distinguish Travis@IBM and the public
# Travis in job conditions, because the environment that can be tested
# is very restricted (see https://docs.travis-ci.com/user/conditions-v1)
# and the build worker has not been set up at the time the condition is
# tested.
# For now, we use logic that relies on conditions not yet being supported
# by Travis@IBM.
- # Travis@IBM
if: false # ignored by Travis@IBM
os: linux-s390
language: python
python: "3.8"
env:
- PACKAGE_LEVEL=latest
- ARCH=s390x
cache: pip
- # Public Travis
arch: s390x # ignored by Travis@IBM, so it runs default arch
os: linux
language: python
python: "3.8"
env:
- PACKAGE_LEVEL=latest
cache: pip
- # Travis@IBM
if: false # ignored by Travis@IBM
os: linux-ppc64le
language: python
python: "3.8"
env:
- PACKAGE_LEVEL=latest
- ARCH=ppc64le
cache: pip
- # Public Travis
arch: ppc64le # ignored by Travis@IBM, so it runs default arch
os: linux
language: python
python: "3.8"
env:
- PACKAGE_LEVEL=latest
cache: pip
before_install:
- env | sort
- if [[ "$TRAVIS_BRANCH" == "manual-ci-run" ]]; then
export _NEED_REBASE=true;
fi
- if [[ -n $_NEED_REBASE ]]; then git fetch origin master; fi
- if [[ -n $_NEED_REBASE ]]; then git branch master FETCH_HEAD; fi
- if [[ -n $_NEED_REBASE ]]; then git rebase master; fi
- git branch -av
# commands to install dependencies
install:
- which python
- python --version
- if [[ "$TRAVIS_BRANCH" == "manual-ci-run" || "$TRAVIS_PULL_REQUEST_BRANCH" == "manual-ci-run" ]]; then
export _MANUAL_CI_RUN=true;
fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
if [[ ${PYTHON:0:1} == '2' ]]; then
OSX_PYTHON_PKG=python;
OSX_PYTHON_CMD=python;
else
OSX_PYTHON_PKG=python3;
OSX_PYTHON_CMD=python3;
fi;
which $OSX_PYTHON_CMD || brew install $OSX_PYTHON_PKG;
fi
# Reason for setting up a Python virtualenv on OS-X:
# Some Ansible scripts are invoked directly from the cloned Ansible repo
# directory, so their hashbang is '/usr/bin/env python'. This requires
# that the 'python' command and environment is the desired one. On OS-X,
# when installing Python 3, only the 'python3' command invokes Python 3,
# but the 'python' command invokes Python 2. Therefore, a virtualenv is
# needed in which the desired Python version is available as the
# 'python'. command. Travis does not set up a virtualenv on its OS-X
# machines, so we need to do that here.
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
pip install virtualenv;
VENV=$HOME/virtualenv/$OSX_PYTHON_CMD;
virtualenv -p $OSX_PYTHON_CMD $VENV;
source $VENV/bin/activate;
fi
# The following circumvents a permission issue on s390x, see
# https://travis-ci.community/t/pip-install-fails-with-permission-error-in-cpu-architecture-s390x/8335
# TODO: Remove the circumvention once fixed in Travis on s390x setup.
- id
- ls -al ~/.cache/pip/wheels || true
- if [[ -d ~/.cache/pip/wheels ]]; then sudo chown -Rv $USER:$GROUP ~/.cache/pip/wheels; fi
- ls -al ~/.cache/pip/wheels || true
- which python
- python --version
- which pip
- pip --version
- pip list
- make install
- pip list
- make develop
- pip list
- pip install python-coveralls
- pip list
- make platform
# commands to run builds & tests
script:
- make check
- if [[ -n $_MANUAL_CI_RUN ]]; then make pylint; fi
- make test
- make installtest
- make build
- make builddoc
- make debuginfo
after_success:
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$PACKAGE_LEVEL" == "latest" && -z $_MANUAL_CI_RUN ]]; then
coveralls;
fi