1
+ sudo : false
2
+
3
+ addons :
4
+ apt :
5
+ packages :
6
+ - inkscape
7
+ - libav-tools
8
+ - gdb
9
+ - mencoder
10
+ - dvipng
11
+ - texlive-latex-base
12
+ - texlive-latex-extra
13
+ - texlive-fonts-recommended
14
+ - texlive-latex-recommended
15
+ - graphviz
16
+ # - fonts-humor-sans
17
+ # sources:
18
+ # - debian-sid
19
+
1
20
env :
2
21
global :
3
22
- ARTIFACTS_AWS_REGION=us-east-1
8
27
- BUILD_DOCS=false
9
28
- TEST_ARGS=--no-pep8
10
29
- NUMPY=numpy
30
+ - NPROC=2
11
31
12
32
language : python
13
33
@@ -22,26 +42,45 @@ matrix:
22
42
env : TEST_ARGS=--pep8
23
43
- python : 2.7
24
44
env : BUILD_DOCS=true
45
+ - python : " nightly"
46
+ env : PRE=--pre
47
+ allow_failures :
48
+ - python : " nightly"
49
+
50
+ before_install :
51
+ - source tools/travis_tools.sh
52
+ # Install into our own pristine virtualenv
53
+ - virtualenv --python=python venv
54
+ - source venv/bin/activate
25
55
26
56
install :
27
- - pip install -q --use-mirrors nose python-dateutil $NUMPY pep8 pyparsing pillow sphinx!=1.3.0
28
- - sudo apt-get update && sudo apt-get -qq install inkscape libav-tools gdb mencoder
29
- # We use --no-install-recommends to avoid pulling in additional large latex docs that we don't need
57
+ # Install only from travis wheelhouse
58
+ - if [ -z "$PRE" ]; then
59
+ wheelhouse_pip_install python-dateutil $NUMPY pyparsing pillow sphinx!=1.3.0;
60
+ else
61
+ pip install $PRE python-dateutil $NUMPY pyparsing pillow sphinx!=1.3.0;
62
+ fi
63
+ # Always install from pypi
64
+ - pip install $PRE nose pep8
30
65
31
66
# We manually install humor sans using the package from Ubuntu 14.10. Unfortunatly humor sans is not
32
67
# availible in the Ubuntu version used by Travis but we can manually install the deb from a later
33
68
# version since is it basically just a .ttf file
69
+ # The current Travis Ubuntu image is to old to search .local/share/fonts so we store fonts in .fonts
34
70
35
71
# We install ipython to use the console highlighting. From IPython 3 this depends on jsonschema and misture.
36
72
# Neihter is installed as a dependency of IPython since they are not used by the IPython console.
37
73
- |
38
74
if [[ $BUILD_DOCS == true ]]; then
39
- sudo apt-get install -qq --no-install-recommends dvipng texlive-latex-base texlive-latex-extra texlive-fonts-recommended graphviz
40
- pip install numpydoc linkchecker ipython jsonschema mistune
75
+ pip install $PRE numpydoc ipython jsonschema mistune
76
+ pip install -q $PRE linkchecker
77
+ wget https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true -O Felipa-Regular.ttf
41
78
wget http://mirrors.kernel.org/ubuntu/pool/universe/f/fonts-humor-sans/fonts-humor-sans_1.0-1_all.deb
42
- sudo dpkg -i fonts-humor-sans_1.0-1_all.deb
43
- wget https://googlefontdirectory.googlecode.com/hg/ofl/felipa/Felipa-Regular.ttf
44
- sudo cp Felipa-Regular.ttf /usr/local/share/fonts/
79
+ mkdir -p tmp
80
+ mkdir -p ~/.fonts
81
+ dpkg -x fonts-humor-sans_1.0-1_all.deb tmp
82
+ cp tmp/usr/share/fonts/truetype/humor-sans/Humor-Sans.ttf ~/.fonts
83
+ cp Felipa-Regular.ttf ~/.fonts
45
84
fc-cache -f -v
46
85
fi;
47
86
- python setup.py install
@@ -50,17 +89,16 @@ script:
50
89
# The number of processes is hardcoded, because using too many causes the
51
90
# Travis VM to run out of memory (since so many copies of inkscape and
52
91
# ghostscript are running at the same time).
53
- - echo Testing using 8 processes
92
+ - echo Testing using $NPROC processes
54
93
# Generate the font caches in a single process before starting the
55
94
# multiple processes
56
- - gcc --version
57
95
- python -c "from matplotlib import font_manager"
58
96
- |
59
97
if [[ $BUILD_DOCS == false ]]; then
60
98
export MPL_REPO_DIR=$PWD # needed for pep8-conformance test of the examples
61
99
mkdir ../tmp_test_dir
62
100
cd ../tmp_test_dir
63
- gdb -return-child-result -batch -ex r -ex bt --args python ../matplotlib/tests.py -sv --processes=8 --process-timeout=300 $TEST_ARGS
101
+ gdb -return-child-result -batch -ex r -ex bt --args python ../matplotlib/tests.py -s --processes=$NPROC --process-timeout=300 $TEST_ARGS
64
102
else
65
103
cd doc
66
104
python make.py html --small --warningsaserrors
@@ -76,12 +114,14 @@ after_failure:
76
114
cd $TRAVIS_BUILD_DIR/../tmp_test_dir
77
115
tar cjf result_images.tar.bz2 result_images
78
116
travis-artifacts upload --path result_images.tar.bz2
79
- echo "The result images will only be uploaded if they are on the matplotlib/matplotlib repo - this is for security reasons to prevent arbitrary PRs echoing security details." else echo https://s3.amazonaws.com/matplotlib-test-results/artifacts/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/result_images.tar.bz2
117
+ echo https://s3.amazonaws.com/matplotlib-test-results/artifacts/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/result_images.tar.bz2
118
+ else
119
+ echo "The result images will only be uploaded if they are on the matplotlib/matplotlib repo - this is for security reasons to prevent arbitrary PRs echoing security details."
80
120
fi
81
121
82
122
after_success :
83
123
|
84
- if [[ $TRAVIS_PULL_REQUEST == false && $BUILD_DOCS == true && $TRAVIS_BRANCH == 'master' ]]; then
124
+ if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' && $ BUILD_DOCS == true && $TRAVIS_BRANCH == 'master' ]]; then
85
125
cd $TRAVIS_BUILD_DIR
86
126
echo "Uploading documentation"
87
127
openssl aes-256-cbc -K $encrypted_cc802e084cd0_key -iv $encrypted_cc802e084cd0_iv -in .travis/matplotlibDeployKey.enc -out .travis/matplotlibDeployKey -d
0 commit comments