From 7ed9894d4c2bfe3f54506ea0c9fc0cfe81b1b709 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Mon, 24 Nov 2014 11:10:33 -0500 Subject: [PATCH 1/5] Use Conda for dependencies on Travis --- .travis.yml | 64 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index fefdf90e7aeb..0168604cf2b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,12 +6,14 @@ env: - secure: E7OCdqhZ+PlwJcn+Hd6ns9TDJgEUXiUNEI0wu7xjxB2vBRRIKtZMbuaZjd+iKDqCKuVOJKu0ClBUYxmgmpLicTwi34CfTUYt6D4uhrU+8hBBOn1iiK51cl/aBvlUUrqaRLVhukNEBGZcyqAjXSA/Qsnp2iELEmAfOUa92ZYo1sk= - BUILD_DOCS=false - TEST_ARGS=--no-pep8 + - NUMPY_VERSION=1.9 language: python matrix: include: - python: 2.6 + env: NUMPY_VERSION=1.6 - python: 2.7 - python: 3.3 - python: 3.4 @@ -20,12 +22,33 @@ matrix: - python: 2.7 env: BUILD_DOCS=true +before_install: + # Download and install conda + - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh + - chmod +x miniconda.sh + - ./miniconda.sh -b + - export PATH=/home/travis/miniconda/bin:$PATH + - conda update --yes conda + install: - - pip install -q --use-mirrors nose python-dateutil numpy pep8 pyparsing pillow - - sudo apt-get update && sudo apt-get -qq install inkscape libav-tools - # We use --no-install-recommends to avoid pulling in additional large latex docs that we don't need - - if [[ $BUILD_DOCS == true ]]; then sudo apt-get install -qq --no-install-recommends dvipng texlive-latex-base texlive-latex-extra texlive-fonts-recommended graphviz; fi - - if [[ $BUILD_DOCS == true ]]; then pip install sphinx numpydoc linkchecker; fi + # Set up Conda environment + - conda create --yes -n test python=$TRAVIS_PYTHON_VERSION + - source activate test + + # Install core Python dependencies using conda + - conda install --yes nose python-dateutil numpy=$NUMPY_VERSION pep8 pyparsing pillow + + # Install some non-Python dependencies through apt-get + - sudo apt-get update + - sudo apt-get -qq install inkscape libav-tools + # We use --no-install-recommends to avoid pulling in additional large latex docs that we don't need + - | + if [[ $BUILD_DOCS == true ]]; then + sudo apt-get install -qq --no-install-recommends dvipng texlive-latex-base texlive-latex-extra texlive-fonts-recommended graphviz; + conda install sphinx numpydoc linkchecker; + fi + + # Now, install matplotlib - python setup.py install script: @@ -36,16 +59,25 @@ script: # Generate the font caches in a single process before starting the # multiple processes - python -c "from matplotlib import font_manager" - - if [[ $BUILD_DOCS == false ]]; then mkdir ../tmp_test_dir; fi - - if [[ $BUILD_DOCS == false ]]; then cd ../tmp_test_dir; fi - - if [[ $BUILD_DOCS == false ]]; then python ../matplotlib/tests.py -sv --processes=8 --process-timeout=300 $TEST_ARGS; fi - - if [[ $BUILD_DOCS == true ]]; then cd doc; python make.py html --small; fi - # We don't build the LaTeX docs here, so linkchecker will complain - - if [[ $BUILD_DOCS == true ]]; then touch build/html/Matplotlib.pdf; fi - - if [[ $BUILD_DOCS == true ]]; then linkchecker build/html/index.html; fi + - | + if [[ $BUILD_DOCS == false ]]; then + mkdir ../tmp_test_dir; + cd ../tmp_test_dir; + python ../matplotlib/tests.py -sv --processes=8 --process-timeout=300 $TEST_ARGS; + else + cd doc; python make.py html --small; + # We don't build the LaTeX docs here, so linkchecker will complain + touch build/html/Matplotlib.pdf; + linkchecker build/html/index.html; + fi after_failure: - - tar cjf result_images.tar.bz2 result_images - - if [[ $TRAVIS_PULL_REQUEST == false ]]; then gem install travis-artifacts; fi - - if [[ $TRAVIS_PULL_REQUEST == false ]]; then travis-artifacts upload --path result_images.tar.bz2; fi - - if [[ $TRAVIS_PULL_REQUEST != false ]]; then 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; fi + - | + if [[ $TRAVIS_PULL_REQUEST == false ]]; then + tar cjf result_images.tar.bz2 result_images; + gem install travis-artifacts; fi + travis-artifacts upload --path result_images.tar.bz2; + echo https://s3.amazonaws.com/matplotlib-test-results/artifacts/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/result_images.tar.bz2; + else + 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." + fi From f6a6f55e44c9f9015d7951b3c59486f47b94fc97 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Mon, 24 Nov 2014 12:38:37 -0500 Subject: [PATCH 2/5] Trivial change to force Travis' hand --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 0168604cf2b4..156a280abec7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,7 @@ before_install: - export PATH=/home/travis/miniconda/bin:$PATH - conda update --yes conda + install: # Set up Conda environment - conda create --yes -n test python=$TRAVIS_PYTHON_VERSION From 96c5a2dbc42a312a0b2229c82641d7a75df606ee Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Mon, 24 Nov 2014 15:36:20 -0500 Subject: [PATCH 3/5] Rename dateutil --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 156a280abec7..a84595eda782 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ install: - source activate test # Install core Python dependencies using conda - - conda install --yes nose python-dateutil numpy=$NUMPY_VERSION pep8 pyparsing pillow + - conda install --yes nose dateutil numpy=$NUMPY_VERSION pep8 pyparsing pillow # Install some non-Python dependencies through apt-get - sudo apt-get update From 01859a2d6deef2923c91dd7b05af2ae7d168c114 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 3 Dec 2014 10:23:27 -0500 Subject: [PATCH 4/5] linkchecker is not on Conda --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a84595eda782..f5ee7afd1774 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,8 @@ install: - | if [[ $BUILD_DOCS == true ]]; then sudo apt-get install -qq --no-install-recommends dvipng texlive-latex-base texlive-latex-extra texlive-fonts-recommended graphviz; - conda install sphinx numpydoc linkchecker; + conda install sphinx numpydoc; + pip install linkchecker; fi # Now, install matplotlib From 01ee6daf1696d392c6ad75dbc36cb436c47cc2a3 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 3 Dec 2014 10:53:08 -0500 Subject: [PATCH 5/5] Need conda install --yes --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f5ee7afd1774..cb84cd5c02a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,7 @@ install: - | if [[ $BUILD_DOCS == true ]]; then sudo apt-get install -qq --no-install-recommends dvipng texlive-latex-base texlive-latex-extra texlive-fonts-recommended graphviz; - conda install sphinx numpydoc; + conda install --yes sphinx numpydoc; pip install linkchecker; fi