From baba75f889fefa55f6f76387a4ac9ae6b7e69f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Padilla?= Date: Thu, 12 Mar 2015 10:28:10 -0400 Subject: [PATCH 1/3] Tweaks for package caching on travis --- .travis.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3eb89dc4f..c4edc30d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,24 @@ language: python sudo: false +cache: + # Apparently if you override the install command that silently disables the + # cache: pip support. This is less than ideal and I've opened up + # travis-ci/travis-ci#3239 to hopefully get that addressed. For now I'll + # manually add the pip cache directory to the build cache. + directories: + - ~/.cache/pip + env: + global: + # These two environment variables could be set by Travis itself, or Travis + # could configure itself in /etc/, ~/, or inside of the virtual + # environments. In any case if these two values get configured then end + # users only need to enable the pip cache and manually run pip wheel before + # running pip install. + - PIP_WHEEL_DIR=$HOME/.cache/pip/wheels + - PIP_FIND_LINKS=file://$HOME/.cache/pip/wheels + matrix: - TOX_ENV=py27-flake8 - TOX_ENV=py27-docs - TOX_ENV=py34-django17 @@ -27,7 +44,8 @@ env: - TOX_ENV=py27-django18beta install: + - pip wheel tox - pip install tox script: - - tox -e $TOX_ENV + - tox -e $TOX_ENV From f30fe10251ce192a62a6549b1d95f2812d838d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Padilla?= Date: Sat, 14 Mar 2015 12:16:41 -0400 Subject: [PATCH 2/3] Try custom tox install_command --- pip_install.sh | 5 +++++ tox.ini | 1 + 2 files changed, 6 insertions(+) create mode 100755 pip_install.sh diff --git a/pip_install.sh b/pip_install.sh new file mode 100755 index 000000000..07826b602 --- /dev/null +++ b/pip_install.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +echo "$@" +pip wheel "$@" +pip install --upgrade "$@" diff --git a/tox.ini b/tox.ini index c986250c5..71bb22eab 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,7 @@ envlist = {py27,py32,py33,py34}-django{17,18beta} [testenv] +install_command = ./pip_install.sh {opts} {packages} commands = ./runtests.py --fast setenv = PYTHONDONTWRITEBYTECODE=1 From 1bbeb83c1fce29bd7d0d96650d6fe295f2b5ad9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Padilla?= Date: Sat, 14 Mar 2015 13:15:40 -0400 Subject: [PATCH 3/3] More tests with tox --- .travis.yml | 1 + pip_install.sh | 5 ----- tox.ini | 4 +++- 3 files changed, 4 insertions(+), 6 deletions(-) delete mode 100755 pip_install.sh diff --git a/.travis.yml b/.travis.yml index c4edc30d8..1bd8c3101 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,7 @@ env: # running pip install. - PIP_WHEEL_DIR=$HOME/.cache/pip/wheels - PIP_FIND_LINKS=file://$HOME/.cache/pip/wheels + - PIP_DOWNLOAD_CACHE=$HOME/.cache/pip matrix: - TOX_ENV=py27-flake8 - TOX_ENV=py27-docs diff --git a/pip_install.sh b/pip_install.sh deleted file mode 100755 index 07826b602..000000000 --- a/pip_install.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo "$@" -pip wheel "$@" -pip install --upgrade "$@" diff --git a/tox.ini b/tox.ini index 71bb22eab..5119bbb37 100644 --- a/tox.ini +++ b/tox.ini @@ -6,10 +6,12 @@ envlist = {py27,py32,py33,py34}-django{17,18beta} [testenv] -install_command = ./pip_install.sh {opts} {packages} commands = ./runtests.py --fast setenv = PYTHONDONTWRITEBYTECODE=1 + PIP_WHEEL_DIR=$HOME/.cache/pip/wheels + PIP_FIND_LINKS=file://$HOME/.cache/pip/wheels + PIP_DOWNLOAD_CACHE=$HOME/.cache/pi deps = django14: Django==1.4.11 # Should track minimum supported django15: Django==1.5.6 # Should track minimum supported