Skip to content

Commit f2402af

Browse files
committed
travis.yml: update to Trusty
and massive cleanup of the file, with addition of more debug output and comments.
1 parent afc52a6 commit f2402af

File tree

1 file changed

+75
-56
lines changed

1 file changed

+75
-56
lines changed

.travis.yml

Lines changed: 75 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -5,149 +5,165 @@ env:
55
global:
66
- WINDOWS=0
77
- SITECUSTOMIZELIBPATH=0
8+
- PYPY=0
89

10+
dist: trusty
911
matrix:
1012
include:
1113
- os: linux
12-
python: 3.5
14+
# BUILD 1 -------------------
15+
python: 3.6
1316
env: WINDOWS=1
1417
- os: linux
18+
# BUILD 2 -------------------
1519
python: 2.7
1620
env:
21+
# gcc 4.8.4 with c++98
1722
- XML_GENERATOR="castxml"
1823
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python2.7/lib/python2.7/sitecustomize.py"
1924
- os: linux
25+
# BUILD 3 -------------------
2026
python: 3.3
2127
env:
28+
# gcc 4.8.4 with c++98
2229
- XML_GENERATOR="castxml"
2330
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.3/lib/python3.3/sitecustomize.py"
2431
- os: linux
32+
# BUILD 4 -------------------
2533
python: 3.4
2634
env:
35+
# gcc 4.8.4 with c++98
2736
- XML_GENERATOR="castxml"
2837
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.4/lib/python3.4/sitecustomize.py"
2938
- os: linux
39+
# BUILD 5 -------------------
3040
python: 3.5
3141
env:
42+
# gcc 4.8.4 with c++98
3243
- XML_GENERATOR="castxml"
3344
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.5/lib/python3.5/sitecustomize.py"
3445
- os: linux
46+
# BUILD 6 -------------------
3547
python: 3.6
3648
env:
49+
# gcc 4.8.4 with c++98
3750
- XML_GENERATOR="castxml"
3851
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.6/lib/python3.6/sitecustomize.py"
3952
- os: linux
40-
python: "pypy"
53+
# BUILD 7 -------------------
54+
python: pypy
4155
env:
56+
# gcc 4.8.4 with c++98
4257
- XML_GENERATOR="castxml"
4358
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/pypy/lib-python/2.7/sitecustomize.py"
59+
- PYPY=1
4460
- os: linux
45-
python: "pypy3.3-5.2-alpha1"
61+
# BUILD 8 -------------------
62+
python: pypy3
4663
env:
64+
# gcc 4.8.4 with c++98
4765
- XML_GENERATOR="castxml"
4866
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/pypy3/lib-python/3/sitecustomize.py"
67+
- PYPY=1
4968
- os: linux
50-
python: 3.5
69+
# BUILD 9 -------------------
70+
python: 3.6
5171
env:
52-
- XML_GENERATOR="castxml"
53-
- COMPILER=g++-5
54-
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.5/lib/python3.5/sitecustomize.py"
72+
# gcc 5.4.1 with c++98
73+
- XML_GENERATOR="castxml"
74+
- COMPILER=g++-5
75+
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.6/lib/python3.6/sitecustomize.py"
5576
addons:
5677
apt:
5778
sources:
5879
- ubuntu-toolchain-r-test
5980
packages:
60-
# gcc 5.2.1
6181
- g++-5
6282
- os: linux
63-
dist: trusty
64-
sudo: required
65-
python: 3.5
83+
# BUILD 10 ------------------
84+
python: 3.6
6685
env:
6786
- XML_GENERATOR="castxml"
68-
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.5/lib/python3.5/sitecustomize.py"
87+
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.6/lib/python3.6/sitecustomize.py"
6988
- os: linux
70-
dist: trusty
71-
sudo: required
72-
python: 3.5
89+
# BUILD 11 ------------------
90+
python: 3.6
7391
env:
74-
# gcc 4.8.2 with c++03
75-
- XML_GENERATOR="castxml"
76-
- CPPSTD="-std=c++03"
77-
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.5/lib/python3.5/sitecustomize.py"
92+
# gcc 4.8.4 with c++03
93+
- XML_GENERATOR="castxml"
94+
- CPPSTD="-std=c++03"
95+
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.6/lib/python3.6/sitecustomize.py"
7896
- os: linux
79-
dist: trusty
80-
sudo: required
81-
python: 3.5
97+
# BUILD 12 ------------------
98+
python: 3.6
8299
env:
83-
# gcc 4.8.2 with c++11
84-
- XML_GENERATOR="castxml"
85-
- CPPSTD="-std=c++11"
86-
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.5/lib/python3.5/sitecustomize.py"
100+
# gcc 4.8.4 with c++11
101+
- XML_GENERATOR="castxml"
102+
- CPPSTD="-std=c++11"
103+
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.6/lib/python3.6/sitecustomize.py"
87104
- os: linux
88-
dist: trusty
89-
sudo: required
90-
python: 3.5
105+
# BUILD 13 ------------------
106+
python: 3.6
91107
env:
92-
- XML_GENERATOR="castxml"
93-
- COMPILER=g++-5
94-
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.5/lib/python3.5/sitecustomize.py"
108+
# gcc 5.4.1 with c++11
109+
- XML_GENERATOR="castxml"
110+
- COMPILER=g++-5
111+
- CPPSTD="-std=c++11"
112+
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.6/lib/python3.6/sitecustomize.py"
95113
addons:
96114
apt:
97115
sources:
98116
- ubuntu-toolchain-r-test
99117
packages:
100-
# gcc 5.3.0
101118
- g++-5
102119
- os: linux
103-
dist: trusty
104-
sudo: required
105-
python: 3.5
120+
# BUILD 14 ------------------
121+
python: 3.6
106122
env:
107-
- XML_GENERATOR="castxml"
108-
- COMPILER=g++-5
109-
- CPPSTD="-std=c++14"
110-
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.5/lib/python3.5/sitecustomize.py"
123+
# gcc 5.4.1 with c++14
124+
- XML_GENERATOR="castxml"
125+
- COMPILER=g++-5
126+
- CPPSTD="-std=c++14"
127+
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.6/lib/python3.6/sitecustomize.py"
111128
addons:
112129
apt:
113130
sources:
114131
- ubuntu-toolchain-r-test
115132
packages:
116-
# gcc 5.3.0
117133
- g++-5
118134
- os: osx
135+
# BUILD 15 ------------------
119136
osx_image: xcode7.3
120137
language: generic
121138
env:
122139
- XML_GENERATOR="castxml"
123140
- TRAVIS_PYTHON_VERSION="2"
124141
- SITECUSTOMIZELIBPATH="/usr/local/lib/python2.7/site-packages/sitecustomize.py"
125142
- os: osx
143+
# BUILD 16 ------------------
126144
osx_image: xcode7.3
127145
language: generic
128146
env:
129147
- XML_GENERATOR="castxml"
130148
- TRAVIS_PYTHON_VERSION="3"
131149
- SITECUSTOMIZELIBPATH="/usr/local/lib/python3.6/site-packages/sitecustomize.py"
132150
- os: linux
133-
dist: trusty
134-
sudo: required
135-
python: 3.5
151+
# BUILD 17 ------------------
152+
python: 3.6
136153
env:
137154
- XML_GENERATOR="castxml-18032017"
138-
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.5/lib/python3.5/sitecustomize.py"
155+
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.6/lib/python3.6/sitecustomize.py"
139156
- os: linux
140-
dist: trusty
141-
sudo: required
142-
python: 3.5
157+
# BUILD 18 ------------------
158+
python: 3.6
143159
env:
144160
- XML_GENERATOR="castxml-18032017"
145161
- CASTXML_EPIC="1"
146-
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.5/lib/python3.5/sitecustomize.py"
162+
- SITECUSTOMIZELIBPATH="/home/travis/virtualenv/python3.6/lib/python3.6/sitecustomize.py"
147163

148164

149165
before_install:
150-
# OS X
166+
# OS X
151167
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then travis_retry brew update; fi
152168
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $TRAVIS_PYTHON_VERSION == 3 ]]; then brew install python3; fi
153169
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $TRAVIS_PYTHON_VERSION == 3 ]]; then sudo ln -sf /usr/local/bin/pip3 /usr/local/bin/pip; fi
@@ -179,27 +195,22 @@ before_install:
179195
export PATH=$PATH:~/castxml/bin/;
180196
fi
181197

182-
# Patch the c++ version to test on the fly
183198
- if [[ $CPPSTD == "-std=c++03" ]]; then
184199
mv unittests/configs/travis_std03.cfg unittests/xml_generator.cfg;
185200
fi
186201

187-
# Patch the c++ version to test on the fly
188202
- if [[ $CPPSTD == "-std=c++11" ]]; then
189203
mv unittests/configs/travis_std11.cfg unittests/xml_generator.cfg;
190204
fi
191205

192-
# Patch the c++ version to test on the fly
193206
- if [[ $CPPSTD == "-std=c++14" ]]; then
194207
mv unittests/configs/travis_std14.cfg unittests/xml_generator.cfg;
195208
fi
196209

197-
# Patch the compiler path on the fly for gcc5 testing
198210
- if [[ "$COMPILER" == "g++-5" ]] && [[ $XML_GENERATOR == "castxml" ]]; then
199211
mv unittests/configs/travis_gcc5.cfg unittests/xml_generator.cfg;
200212
fi
201213

202-
# Patch the c++ version to test on the fly
203214
- if [[ $CASTXML_EPIC == "1" ]]; then
204215
mv unittests/configs/castxml_epic1.cfg unittests/xml_generator.cfg;
205216
fi
@@ -219,6 +230,7 @@ script:
219230
- echo $TRAVIS_OS_NAME
220231
- echo $WINDOWS
221232
- python --version
233+
- c++ --version
222234

223235
# Modify sitecustomize.py file for coverage. Allows to cover files run in a subprocess.
224236
- if [ $WINDOWS == 0 ]; then
@@ -229,11 +241,18 @@ script:
229241
# Install pygccxml, run the tests with coverage and
230242
# combine multiple .coverage files
231243
# We have multiple coverage files because some scripts run in a subprocess
232-
- if [ $WINDOWS == 0 ]; then
244+
- if [[ $WINDOWS == 0 ]] && [[ $PYPY == 0 ]]; then
233245
python setup.py install || travis_terminate 1;
234246
coverage run -m unittests.test_all || travis_terminate 1;
235247
coverage combine || travis_terminate 1;
236248
fi
249+
# For pypy, do not run coverage, as this is extremely slow
250+
# https://bitbucket.org/pypy/pypy/issues/1871/10x-slower-than-cpython-under-coverage
251+
# This is fixed with pypy 4.0, which is not the pypy provided by Travis ...
252+
- if [[ $WINDOWS == 0 ]] && [[ $PYPY != 0 ]]; then
253+
python setup.py install || travis_terminate 1;
254+
python -m unittests.test_all || travis_terminate 1;
255+
fi
237256
# For the "empty" windows build, fetch the coverage results from appveyor
238257
- if [ $WINDOWS == 1 ]; then
239258
appveyor-artifacts -m --owner-name=iMichka --verbose download || travis_terminate 1;

0 commit comments

Comments
 (0)