From 218a48059bdbadaec6ffd704e8f68e2b53799c8e Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Tue, 24 Jul 2018 10:22:55 +0200 Subject: [PATCH 1/2] Trivial cleanups to travis setup. --- .travis.yml | 39 +++++++++---------- .../testing/{travis36.txt => extras.txt} | 2 +- .../testing/{travis35.txt => pin-oldest.txt} | 4 +- .../testing/{travis_all.txt => travis.txt} | 2 +- 4 files changed, 23 insertions(+), 24 deletions(-) rename requirements/testing/{travis36.txt => extras.txt} (50%) rename requirements/testing/{travis35.txt => pin-oldest.txt} (51%) rename requirements/testing/{travis_all.txt => travis.txt} (87%) diff --git a/.travis.yml b/.travis.yml index 45b3e13c07a1..87a1cfab1dcb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,9 +50,9 @@ env: - secure: dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU= # Variables controlling the build. - MPLLOCALFREETYPE=1 - # Variable for the location of an extra pip requirement file + # Variable for the location of an extra pip requirement file. - EXTRAREQS= - # Variable for the location of a pip version file + # Variable for the location of a pip constraints file. - PINNEDVERS= # Variables controlling the test run. - DELETE_FONT_CACHE= @@ -69,39 +69,40 @@ env: matrix: include: - python: 3.5 - # pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124. env: - - PINNEDVERS='-c requirements/testing/travis35.txt' + - PINNEDVERS='-c requirements/testing/pin-oldest.txt' - python: 3.5 env: # - PYTHONOPTIMIZE=2 # This currently doesn't work. - python: 3.6 env: - DELETE_FONT_CACHE=1 - - EXTRAREQS='-r requirements/testing/travis36.txt' + - EXTRAREQS='-r requirements/testing/extras.txt' - RUN_FLAKE8=1 - python: "nightly" - env: PRE=--pre + env: + - PRE=--pre - os: osx language: generic # https://github.com/travis-ci/travis-ci/issues/2312 only: master cache: - # As for now travis caches only "$HOME/.cache/pip" + # As for now travis caches only "$HOME/.cache/pip". # https://docs.travis-ci.com/user/caching/#pip-cache pip: false directories: - $HOME/Library/Caches/pip - # `cache` does not support `env`-like `global` so copy-paste from top + # `cache` does not support `env`-like `global` so copy-paste from top. - $HOME/.ccache # https://github.com/travis-ci/travis-ci/issues/5853 - $HOME/.cache/matplotlib allow_failures: - python: "nightly" before_install: | - # test with non-ascii in path - if [[ $TRAVIS_OS_NAME != 'osx' ]]; then + case "$TRAVIS_OS_NAME" in + linux) export PATH=/usr/lib/ccache:$PATH - else + ;; + osx) ci/silence brew update brew upgrade python brew install ffmpeg imagemagick mplayer ccache @@ -112,7 +113,8 @@ before_install: | # but this makes the test time really long. # brew install ghostscript inkscape export PATH=/usr/local/opt/python/libexec/bin:/usr/local/opt/ccache/libexec:$PATH - fi + ;; + esac install: - | @@ -123,7 +125,7 @@ install: python -mpip install --upgrade pip setuptools wheel - | # Install dependencies from PyPI. - python -mpip install --upgrade $PRE -r requirements/testing/travis_all.txt $EXTRAREQS $PINNEDVERS + python -mpip install --upgrade $PRE -r requirements/testing/travis.txt $EXTRAREQS $PINNEDVERS # GUI toolkits are pip-installable only for some versions of Python so # don't fail if we can't install them. Make it easier to check whether the # install was successful by trying to import the toolkit (sometimes, the @@ -143,9 +145,8 @@ install: python -c 'import wx' && echo 'wxPython is available' || echo 'wxPython is not available' - - | - # Install matplotlib + # Install matplotlib. python -mpip install -ve . before_script: | @@ -158,8 +159,8 @@ before_script: | fi script: - # each script we want to run need to go in it's own section and the program you want - # to fail travis need to be the last thing called + # Each script we want to run need to go in its own section and the program + # you want to fail travis need to be the last thing called. - | echo "Calling pytest with the following arguments: $PYTEST_ADDOPTS" python -mpytest @@ -168,10 +169,8 @@ script: flake8 --statistics && echo "Flake8 passed without any issues!" fi - before_cache: | - rm -rf $HOME/.cache/matplotlib/tex.cache - rm -rf $HOME/.cache/matplotlib/test_cache + rm -rf $HOME/.cache/matplotlib/{test_cache,tex.cache} after_failure: | if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' ]]; then diff --git a/requirements/testing/travis36.txt b/requirements/testing/extras.txt similarity index 50% rename from requirements/testing/travis36.txt rename to requirements/testing/extras.txt index 31ea599d7e82..707f6c5ea90d 100644 --- a/requirements/testing/travis36.txt +++ b/requirements/testing/extras.txt @@ -1,4 +1,4 @@ -# Extra pip requirements for the travis python 3.6 build +# extra pip requirements for the 'full' travis build flake8 flake8-per-file-ignores diff --git a/requirements/testing/travis35.txt b/requirements/testing/pin-oldest.txt similarity index 51% rename from requirements/testing/travis35.txt rename to requirements/testing/pin-oldest.txt index 67a58014dab0..088da07b8b7d 100644 --- a/requirements/testing/travis35.txt +++ b/requirements/testing/pin-oldest.txt @@ -1,4 +1,4 @@ -# Extra pip requirements for the first travis python 3.5 build +# pip constraints for the first travis build, pinning to the oldest supported version cycler==0.10 python-dateutil==2.1 @@ -6,6 +6,6 @@ numpy==1.10.0 pandas<0.21.0 pyparsing==2.0.1 pytest==3.4 -pytest-cov==2.3.1 +pytest-cov==2.3.1 # Due to https://github.com/pytest-dev/pytest-cov/issues/124. pytest-timeout==1.2.1 # Newer pytest-timeouts don't support pytest 3.4. sphinx==1.3 diff --git a/requirements/testing/travis_all.txt b/requirements/testing/travis.txt similarity index 87% rename from requirements/testing/travis_all.txt rename to requirements/testing/travis.txt index 364e43fd8875..e7c583a87c5b 100644 --- a/requirements/testing/travis_all.txt +++ b/requirements/testing/travis.txt @@ -1,4 +1,4 @@ -# pip requirements for all the travis builds +# pip requirements for all travis builds codecov coverage From 4206f5dcfe24bf713499d80eac188ca6d5fe38d6 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Tue, 24 Jul 2018 10:45:39 +0200 Subject: [PATCH 2/2] Pin OSX CI to numpy<1.15 to unbreak the build. --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 87a1cfab1dcb..9011791fe496 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,7 @@ env: - secure: dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU= # Variables controlling the build. - MPLLOCALFREETYPE=1 - # Variable for the location of an extra pip requirement file. + # Variable for the location of an extra pip requirements file. - EXTRAREQS= # Variable for the location of a pip constraints file. - PINNEDVERS= @@ -126,6 +126,9 @@ install: - | # Install dependencies from PyPI. python -mpip install --upgrade $PRE -r requirements/testing/travis.txt $EXTRAREQS $PINNEDVERS + if [[ $TRAVIS_OS_NAME = 'osx' ]]; then + python -mpip install 'numpy<1.15' # Unbreak the OSX build for now. + fi # GUI toolkits are pip-installable only for some versions of Python so # don't fail if we can't install them. Make it easier to check whether the # install was successful by trying to import the toolkit (sometimes, the