Skip to content

Commit 4398696

Browse files
committed
Update travis.yml on hotfix branch for better testing
The file was just copied from develop
1 parent 9dcc730 commit 4398696

File tree

1 file changed

+87
-15
lines changed

1 file changed

+87
-15
lines changed

.travis.yml

Lines changed: 87 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,109 @@
11
language:
22
- python
33

4-
python:
5-
- "2.6"
6-
- "2.7"
7-
- "3.2"
8-
- "3.3"
9-
- "3.4"
10-
- "3.5"
4+
matrix:
5+
include:
6+
- os: linux
7+
python: 2.6
8+
env: XML_GENERATOR="gccxml"
9+
- os: linux
10+
python: 2.7
11+
env: XML_GENERATOR="gccxml"
12+
- os: linux
13+
python: 3.2
14+
env: XML_GENERATOR="gccxml"
15+
- os: linux
16+
python: 3.3
17+
env: XML_GENERATOR="gccxml"
18+
- os: linux
19+
python: 3.4
20+
env: XML_GENERATOR="gccxml"
21+
- os: linux
22+
python: 3.5
23+
env: XML_GENERATOR="gccxml"
24+
- os: linux
25+
python: 2.7
26+
env: XML_GENERATOR="castxml"
27+
- os: linux
28+
python: 3.5
29+
env: XML_GENERATOR="castxml"
30+
- os: osx
31+
osx_image: xcode7.2
32+
language: generic
33+
env:
34+
- XML_GENERATOR="castxml"
35+
- TRAVIS_PYTHON_VERSION="2"
36+
- os: osx
37+
osx_image: xcode7.2
38+
language: generic
39+
env:
40+
- XML_GENERATOR="castxml"
41+
- TRAVIS_PYTHON_VERSION="3"
42+
1143

1244
before_install:
13-
# Install gccxml
14-
- sudo apt-get update -qq
15-
- sudo apt-get install -qq gccxml
45+
# OS X
46+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then travis_retry brew update; fi
47+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $TRAVIS_PYTHON_VERSION == 2 ]]; then brew install python; fi
48+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $TRAVIS_PYTHON_VERSION == 3 ]]; then brew install python3; fi
49+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $TRAVIS_PYTHON_VERSION == 3 ]]; then sudo ln -sf /usr/local/bin/pip3 /usr/local/bin/pip; fi
50+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $TRAVIS_PYTHON_VERSION == 3 ]]; then sudo ln -sf /usr/local/bin/python3 /usr/local/bin/python; fi
51+
52+
# Download castxml binaries
53+
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
54+
if [ ! -e ${HOME}/castxml ]; then
55+
curl https://midas3.kitware.com/midas/download/item/318762/castxml-macosx.tar.gz | tar zxf - -C ${HOME};
56+
fi;
57+
fi
58+
59+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ $XML_GENERATOR == "castxml" ]]; then
60+
if [ ! -e ${HOME}/castxml ]; then
61+
wget -O - https://midas3.kitware.com/midas/download/item/318227/castxml-linux.tar.gz | tar zxf - -C ${HOME};
62+
fi;
63+
fi
64+
65+
# Add the castxml binary to the path
66+
- if [[ $XML_GENERATOR == "castxml" ]]; then
67+
export PATH=$PATH:~/castxml/bin/;
68+
fi
69+
70+
# Setup gccxml for the gccxml builds on linux
71+
- if [[ "$XML_GENERATOR" == "gccxml" ]]; then sudo apt-get update -qq; fi
72+
- if [[ "$XML_GENERATOR" == "gccxml" ]]; then sudo apt-get install -qq gccxml; fi
73+
1674
# Install pep8, needed by the unit tests
1775
- pip install pep8
76+
1877
# Install coverage tools (On 3.2 the new coverage is broken, use an old one)
1978
# https://github.com/menegazzo/travispy/issues/20
20-
- if [ $TRAVIS_PYTHON_VERSION == 3.2 ];
21-
then pip install 'coverage<4.0'; else
22-
pip install coverage;
79+
- if [ $TRAVIS_PYTHON_VERSION == 3.2 ]; then
80+
pip install 'coverage<4.0';
81+
else
82+
pip install coverage;
2383
fi
2484
- pip install coveralls
2585

2686
install:
2787
- if [[ $TRAVIS_PYTHON_VERSION == 2.6 ]]; then pip install unittest2; fi
2888

2989
script:
90+
- echo $TRAVIS_OS_NAME
91+
3092
# Modify sitecustomize.py file for coverage. Allows to cover files run in a subprocess.
31-
- touch "/home/travis/virtualenv/python${TRAVIS_PYTHON_VERSION}/lib/python${TRAVIS_PYTHON_VERSION}/sitecustomize.py"
32-
- printf "import coverage\ncoverage.process_startup()\n" > "/home/travis/virtualenv/python${TRAVIS_PYTHON_VERSION}/lib/python${TRAVIS_PYTHON_VERSION}/sitecustomize.py"
93+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then touch "/home/travis/virtualenv/python${TRAVIS_PYTHON_VERSION}/lib/python${TRAVIS_PYTHON_VERSION}/sitecustomize.py"; fi
94+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $TRAVIS_PYTHON_VERSION == 2 ]]; then touch "/usr/local/lib/python2.7/site-packages/sitecustomize.py"; fi
95+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $TRAVIS_PYTHON_VERSION == 3 ]]; then touch "/usr/local/lib/python3.5/site-packages/sitecustomize.py"; fi
96+
97+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]];
98+
then printf "import coverage\ncoverage.process_startup()\n" > "/home/travis/virtualenv/python${TRAVIS_PYTHON_VERSION}/lib/python${TRAVIS_PYTHON_VERSION}/sitecustomize.py"; fi
99+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $TRAVIS_PYTHON_VERSION == 2 ]];
100+
then printf "import coverage\ncoverage.process_startup()\n" > "/usr/local/lib/python2.7/site-packages/sitecustomize.py"; fi
101+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $TRAVIS_PYTHON_VERSION == 3 ]];
102+
then printf "import coverage\ncoverage.process_startup()\n" > "/usr/local/lib/python3.5/site-packages/sitecustomize.py"; fi
103+
33104
# Install pygccxml
34105
- python setup.py install
106+
35107
# Run the tests with coverage
36108
- coverage run unittests/test_all.py
37109
# Combine multiple .coverage files (we have multiple files because some scripts were run in a subprocess).

0 commit comments

Comments
 (0)