From 37dea4b0d8a4e39e46b7b95c0089313c356369a7 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Fri, 1 May 2015 13:56:21 +0100 Subject: [PATCH 1/4] fix font issues in Container build --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5375f5142034..4dda1e92d527 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,18 +49,20 @@ install: # We manually install humor sans using the package from Ubuntu 14.10. Unfortunatly humor sans is not # availible in the Ubuntu version used by Travis but we can manually install the deb from a later # version since is it basically just a .ttf file + # The current Travis Ubuntu image is to old to search .local/share/fonts so we store fonts in .fonts # We install ipython to use the console highlighting. From IPython 3 this depends on jsonschema and misture. # Neihter is installed as a dependency of IPython since they are not used by the IPython console. - | if [[ $BUILD_DOCS == true ]]; then pip install numpydoc linkchecker ipython jsonschema mistune - wget https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true + wget https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true -O Felipa-Regular.ttf wget http://mirrors.kernel.org/ubuntu/pool/universe/f/fonts-humor-sans/fonts-humor-sans_1.0-1_all.deb mkdir -p tmp + mkdir -p ~/.fonts dpkg -x fonts-humor-sans_1.0-1_all.deb tmp - cp tmp/usr/share/fonts/truetype/humor-sans/Humor-Sans.ttf ~/.local/share/fonts/ - cp Felipa-Regular.ttf ~/.local/share/fonts/ + cp tmp/usr/share/fonts/truetype/humor-sans/Humor-Sans.ttf ~/.fonts + cp Felipa-Regular.ttf ~/.fonts fc-cache -f -v fi; - python setup.py install From 3a106112c2e889a1fa79d4708854c03c7891288a Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Fri, 1 May 2015 14:00:31 +0100 Subject: [PATCH 2/4] Reorder echo output about image upload to make more sense --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4dda1e92d527..37d9c72ea084 100644 --- a/.travis.yml +++ b/.travis.yml @@ -96,7 +96,9 @@ after_failure: cd $TRAVIS_BUILD_DIR/../tmp_test_dir tar cjf result_images.tar.bz2 result_images travis-artifacts upload --path result_images.tar.bz2 - 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 + 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 after_success: From e500b9a8c4e7fe245610c1b17760a371aad329a3 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Fri, 1 May 2015 14:01:03 +0100 Subject: [PATCH 3/4] Veryfy that we are on matplotlib/matplotlib before trying to upload docs --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 37d9c72ea084..b25357cd3901 100644 --- a/.travis.yml +++ b/.travis.yml @@ -103,7 +103,7 @@ after_failure: after_success: | - if [[ $TRAVIS_PULL_REQUEST == false && $BUILD_DOCS == true && $TRAVIS_BRANCH == 'master' ]]; then + if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' && $BUILD_DOCS == true && $TRAVIS_BRANCH == 'master' ]]; then cd $TRAVIS_BUILD_DIR echo "Uploading documentation" openssl aes-256-cbc -K $encrypted_cc802e084cd0_key -iv $encrypted_cc802e084cd0_iv -in .travis/matplotlibDeployKey.enc -out .travis/matplotlibDeployKey -d From 7e7800f1fa3ec27247fbee8380d493c34a6ee240 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sat, 2 May 2015 16:05:29 +0100 Subject: [PATCH 4/4] Travis: stop using deprecated --use-mirrors Should no longer be needed. In addition only use -q with pip for linkchecker which generates a lot of input. When Travis upgrades to pip 6.1 we should be able to stop using -q since the output will be less noisy when the install succeedes --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b25357cd3901..165ea984985d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,7 +44,7 @@ matrix: env: BUILD_DOCS=true install: - - pip install -q --use-mirrors nose python-dateutil $NUMPY pep8 pyparsing pillow sphinx!=1.3.0 + - pip install -q nose python-dateutil $NUMPY pep8 pyparsing pillow sphinx!=1.3.0 # We manually install humor sans using the package from Ubuntu 14.10. Unfortunatly humor sans is not # availible in the Ubuntu version used by Travis but we can manually install the deb from a later @@ -55,7 +55,8 @@ install: # Neihter is installed as a dependency of IPython since they are not used by the IPython console. - | if [[ $BUILD_DOCS == true ]]; then - pip install numpydoc linkchecker ipython jsonschema mistune + pip install numpydoc ipython jsonschema mistune + pip install -q linkchecker wget https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true -O Felipa-Regular.ttf wget http://mirrors.kernel.org/ubuntu/pool/universe/f/fonts-humor-sans/fonts-humor-sans_1.0-1_all.deb mkdir -p tmp