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+
120env :
221 global :
322 - ARTIFACTS_AWS_REGION=us-east-1
827 - BUILD_DOCS=false
928 - TEST_ARGS=--no-pep8
1029 - NUMPY=numpy
30+ - NPROC=2
1131
1232language : python
1333
@@ -22,26 +42,45 @@ matrix:
2242 env : TEST_ARGS=--pep8
2343 - python : 2.7
2444 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
2555
2656install :
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
3065
3166 # We manually install humor sans using the package from Ubuntu 14.10. Unfortunatly humor sans is not
3267 # availible in the Ubuntu version used by Travis but we can manually install the deb from a later
3368 # 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
3470
3571 # We install ipython to use the console highlighting. From IPython 3 this depends on jsonschema and misture.
3672 # Neihter is installed as a dependency of IPython since they are not used by the IPython console.
3773 - |
3874 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
4178 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
4584 fc-cache -f -v
4685 fi;
4786 - python setup.py install
@@ -50,17 +89,16 @@ script:
5089 # The number of processes is hardcoded, because using too many causes the
5190 # Travis VM to run out of memory (since so many copies of inkscape and
5291 # ghostscript are running at the same time).
53- - echo Testing using 8 processes
92+ - echo Testing using $NPROC processes
5493 # Generate the font caches in a single process before starting the
5594 # multiple processes
56- - gcc --version
5795 - python -c "from matplotlib import font_manager"
5896 - |
5997 if [[ $BUILD_DOCS == false ]]; then
6098 export MPL_REPO_DIR=$PWD # needed for pep8-conformance test of the examples
6199 mkdir ../tmp_test_dir
62100 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
64102 else
65103 cd doc
66104 python make.py html --small --warningsaserrors
@@ -76,12 +114,14 @@ after_failure:
76114 cd $TRAVIS_BUILD_DIR/../tmp_test_dir
77115 tar cjf result_images.tar.bz2 result_images
78116 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."
80120 fi
81121
82122after_success :
83123 |
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
85125 cd $TRAVIS_BUILD_DIR
86126 echo "Uploading documentation"
87127 openssl aes-256-cbc -K $encrypted_cc802e084cd0_key -iv $encrypted_cc802e084cd0_iv -in .travis/matplotlibDeployKey.enc -out .travis/matplotlibDeployKey -d
0 commit comments