|
| 1 | +sudo: false |
| 2 | + |
| 3 | +cache: |
| 4 | + directories: |
| 5 | + - $HOME/.ccache |
| 6 | + - $HOME/.cache/pip |
| 7 | + - $HOME/.cache/matplotlib |
| 8 | + |
| 9 | +addons: |
| 10 | + apt: |
| 11 | + packages: |
| 12 | + - inkscape |
| 13 | + - libav-tools |
| 14 | + - gdb |
| 15 | + - mencoder |
| 16 | + - dvipng |
| 17 | + - pgf |
| 18 | + - lmodern |
| 19 | + - cm-super |
| 20 | + - texlive-latex-base |
| 21 | + - texlive-latex-extra |
| 22 | + - texlive-fonts-recommended |
| 23 | + - texlive-latex-recommended |
| 24 | + - texlive-xetex |
| 25 | + - graphviz |
| 26 | + - libgeos-dev |
| 27 | +# - fonts-humor-sans |
| 28 | +# sources: |
| 29 | +# - debian-sid |
| 30 | + |
1 | 31 | env:
|
2 | 32 | global:
|
3 | 33 | - ARTIFACTS_AWS_REGION=us-east-1
|
4 | 34 | - ARTIFACTS_S3_BUCKET=matplotlib-test-results
|
5 | 35 | - secure: RgJI7BBL8aX5FTOQe7xiXqWHMxWokd6GNUWp1NUV2mRLXPb9dI0RXqZt3UJwKTAzf1z/OtlHDmEkBoTVK81E9iUxK5npwyyjhJ8yTJmwfQtQF2n51Q1Ww9p+XSLORrOzZc7kAo6Kw6FIXN1pfctgYq2bQkrwJPRx/oPR8f6hcbY=
|
6 | 36 | - secure: E7OCdqhZ+PlwJcn+Hd6ns9TDJgEUXiUNEI0wu7xjxB2vBRRIKtZMbuaZjd+iKDqCKuVOJKu0ClBUYxmgmpLicTwi34CfTUYt6D4uhrU+8hBBOn1iiK51cl/aBvlUUrqaRLVhukNEBGZcyqAjXSA/Qsnp2iELEmAfOUa92ZYo1sk=
|
7 |
| - |
8 |
| -before_script: |
9 |
| - - gem install travis-artifacts |
| 37 | + - secure: "dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU=" |
| 38 | + - BUILD_DOCS=false |
| 39 | + - NUMPY=numpy |
| 40 | + - PANDAS= |
| 41 | + - NPROC=2 |
| 42 | + - TEST_ARGS=--no-pep8 |
| 43 | + - NOSE_ARGS="--processes=$NPROC --process-timeout=300" |
10 | 44 |
|
11 | 45 | language: python
|
12 | 46 |
|
13 |
| -python: |
14 |
| - - 2.6 |
15 |
| - - 2.7 |
16 |
| - - 3.2 |
17 |
| - - 3.3 |
| 47 | +matrix: |
| 48 | + include: |
| 49 | + - python: 2.7 |
| 50 | + env: MOCK=mock NUMPY=numpy==1.6 |
| 51 | + - python: 3.4 |
| 52 | + - python: 3.5 |
| 53 | + env: PANDAS=pandas NOSE_ARGS=--with-coverage |
| 54 | + - python: 3.5 |
| 55 | + env: TEST_ARGS=--pep8 |
| 56 | + - python: 3.5 |
| 57 | + env: BUILD_DOCS=true |
| 58 | + - python: "nightly" |
| 59 | + env: PRE=--pre |
| 60 | + allow_failures: |
| 61 | + - python: "nightly" |
| 62 | + |
| 63 | +before_install: |
| 64 | + - | |
| 65 | + # Install into our own pristine virtualenv |
| 66 | + source ci/travis/travis_tools.sh |
| 67 | + virtualenv --python=python venv |
| 68 | + source venv/bin/activate |
| 69 | + export PATH=/usr/lib/ccache:$PATH |
18 | 70 |
|
19 | 71 | install:
|
20 |
| - - pip install -q --use-mirrors nose python-dateutil numpy pep8 pyparsing pillow |
21 |
| - - sudo apt-get update && sudo apt-get -qq install inkscape libav-tools |
22 |
| - - python setup.py install |
| 72 | + - | |
| 73 | + # Setup environment |
| 74 | + ccache -s |
| 75 | + # Upgrade pip and setuptools and wheel to get as clean an install as possible |
| 76 | + pip install --upgrade pip |
| 77 | + pip install --upgrade wheel |
| 78 | + pip install --upgrade setuptools |
| 79 | + - | |
| 80 | + # Install dependencies |
| 81 | + if [ -z "$PRE" ]; then |
| 82 | + # Install only from travis wheelhouse |
| 83 | + wheelhouse_pip_install $NUMPY $PANDAS; |
| 84 | + else |
| 85 | + # Fall back to pypi for non suported python versions |
| 86 | + pip install $PRE $NUMPY $PANDAS; |
| 87 | + fi |
| 88 | + # Always install from pypi |
| 89 | + pip install $PRE pep8 cycler coveralls coverage python-dateutil pyparsing!=2.0.4 |
| 90 | + pip install pillow sphinx!=1.3.0 $MOCK numpydoc ipython colorspacious |
| 91 | + # Install nose from a build which has partial |
| 92 | + # support for python36 and suport for coverage output suppressing |
| 93 | + pip install git+https://github.com/jenshnielsen/nose.git@matplotlibnose |
| 94 | +
|
| 95 | + # We manually install humor sans using the package from Ubuntu 14.10. Unfortunatly humor sans is not |
| 96 | + # availible in the Ubuntu version used by Travis but we can manually install the deb from a later |
| 97 | + # version since is it basically just a .ttf file |
| 98 | + # The current Travis Ubuntu image is to old to search .local/share/fonts so we store fonts in .fonts |
| 99 | + if [[ $BUILD_DOCS == true ]]; then |
| 100 | + wget https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true -O Felipa-Regular.ttf |
| 101 | + wget http://mirrors.kernel.org/ubuntu/pool/universe/f/fonts-humor-sans/fonts-humor-sans_1.0-1_all.deb |
| 102 | + mkdir -p tmp |
| 103 | + mkdir -p ~/.fonts |
| 104 | + dpkg -x fonts-humor-sans_1.0-1_all.deb tmp |
| 105 | + cp tmp/usr/share/fonts/truetype/humor-sans/Humor-Sans.ttf ~/.fonts |
| 106 | + cp Felipa-Regular.ttf ~/.fonts |
| 107 | + fc-cache -f -v |
| 108 | + else |
| 109 | + # Use the special local version of freetype for testing |
| 110 | + cp ci/travis/setup.cfg . |
| 111 | + fi; |
| 112 | + - | |
| 113 | + # Install matplotlib |
| 114 | + pip install -e . |
| 115 | + - | |
| 116 | + # Installing basemap from github until it's back on pypi |
| 117 | + # We have to install it after matplotlib to avoid pulling in MPL as |
| 118 | + # a dependency |
| 119 | + if [[ $BUILD_DOCS == true ]]; then |
| 120 | + pip install https://github.com/matplotlib/basemap/tarball/master |
| 121 | + fi; |
23 | 122 |
|
24 | 123 | script:
|
25 |
| - - mkdir ../tmp_test_dir |
26 |
| - - cd ../tmp_test_dir |
27 | 124 | # The number of processes is hardcoded, because using too many causes the
|
28 | 125 | # Travis VM to run out of memory (since so many copies of inkscape and
|
29 | 126 | # ghostscript are running at the same time).
|
30 |
| - - echo Testing using 8 processes |
31 |
| - # Generate the font caches in a single process before starting the |
32 |
| - # multiple processes |
33 |
| - - python -c "from matplotlib import font_manager" |
34 |
| - - python ../matplotlib/tests.py -sv --processes=8 --process-timeout=300 |
| 127 | + - | |
| 128 | + echo Testing using $NPROC processes |
| 129 | + echo The following args are passed to nose $NOSE_ARGS |
| 130 | + if [[ $BUILD_DOCS == false ]]; then |
| 131 | + export MPL_REPO_DIR=$PWD # needed for pep8-conformance test of the examples |
| 132 | + gdb -return-child-result -batch -ex r -ex bt --args python tests.py $NOSE_ARGS $TEST_ARGS |
| 133 | + else |
| 134 | + cd doc |
| 135 | + python make.py html --small |
| 136 | + # We don't build the LaTeX docs here, so linkchecker will complain |
| 137 | + touch build/html/Matplotlib.pdf |
| 138 | + # Linkchecker only works with python 2.7 for the time being |
| 139 | + deactivate |
| 140 | + source ~/virtualenv/python2.7/bin/activate |
| 141 | + pip install pip --upgrade |
| 142 | + pip install linkchecker |
| 143 | + linkchecker build/html/index.html |
| 144 | + fi |
| 145 | + - rm -rf $HOME/.cache/matplotlib/tex.cache |
| 146 | + - rm -rf $HOME/.cache/matplotlib/test_cache |
35 | 147 |
|
36 | 148 | after_failure:
|
37 |
| - - tar cjf result_images.tar.bz2 result_images |
38 |
| - - travis-artifacts upload --path result_images.tar.bz2 |
39 |
| - - 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." |
40 |
| - - echo https://s3.amazonaws.com/matplotlib-test-results/artifacts/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/result_images.tar.bz2 |
| 149 | + - | |
| 150 | + if [[ $BUILD_DOCS == false && $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' ]]; then |
| 151 | + gem install travis-artifacts |
| 152 | + cd $TRAVIS_BUILD_DIR/../tmp_test_dir |
| 153 | + tar cjf result_images.tar.bz2 result_images |
| 154 | + travis-artifacts upload --path result_images.tar.bz2 |
| 155 | + echo https://s3.amazonaws.com/matplotlib-test-results/artifacts/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/result_images.tar.bz2 |
| 156 | + else |
| 157 | + 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." |
| 158 | + fi |
| 159 | +
|
| 160 | +after_success: |
| 161 | + - | |
| 162 | + if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' && $BUILD_DOCS == true && $TRAVIS_BRANCH == 'master' ]]; then |
| 163 | + cd $TRAVIS_BUILD_DIR |
| 164 | + echo "Uploading documentation" |
| 165 | + openssl aes-256-cbc -K $encrypted_cc802e084cd0_key -iv $encrypted_cc802e084cd0_iv -in ci/travis/matplotlibDeployKey.enc -out ci/travis/matplotlibDeployKey -d |
| 166 | + eval `ssh-agent -s` |
| 167 | + chmod 600 ci/travis/matplotlibDeployKey |
| 168 | + ssh-add ci/travis/matplotlibDeployKey |
| 169 | + cd .. |
| 170 | + git clone [email protected]:matplotlib/devdocs.git |
| 171 | + cd devdocs |
| 172 | + git checkout --orphan gh-pages |
| 173 | + git reset --hard first_commit |
| 174 | + cp -R ../matplotlib/doc/build/html/. . |
| 175 | + touch .nojekyll |
| 176 | + git config --global user.email "MatplotlibTravisBot@nomail" |
| 177 | + git config --global user.name "MatplotlibTravisBot" |
| 178 | + git config --global push.default simple |
| 179 | + git add . |
| 180 | + git commit -m "Docs build of $TRAVIS_COMMIT" |
| 181 | + git push --set-upstream origin gh-pages --force |
| 182 | + else |
| 183 | + echo "Will only deploy docs build from matplotlib master branch" |
| 184 | + fi |
| 185 | + if [[ $TRAVIS_PULL_REQUEST == false ]] && \ |
| 186 | + [[ $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' ]] && \ |
| 187 | + [[ $TRAVIS_BRANCH == 'master' ]]; then |
| 188 | + cd $TRAVIS_BUILD_DIR |
| 189 | + python ci/travis/travis_after_all.py |
| 190 | + export $(cat .to_export_back) |
| 191 | + if [ "$BUILD_LEADER" = "YES" ]; then |
| 192 | + if [ "$BUILD_AGGREGATE_STATUS" = "others_succeeded" ]; then |
| 193 | + echo "All Succeeded! Triggering OSX build..." |
| 194 | + ./ci/travis/build_children.sh |
| 195 | + else |
| 196 | + echo "Some Failed; no OSX build" |
| 197 | + fi |
| 198 | + fi |
| 199 | + fi |
| 200 | + if [[ $NOSE_ARGS="--with-coverage" ]]; then |
| 201 | + coveralls |
| 202 | + fi |
0 commit comments