summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2017-03-23 20:19:34 +0100
committerAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2017-03-29 13:29:58 +0200
commit4f3cb4335c6d934c34d851efa587c525e6fcd876 (patch)
treec869940977e808f5ff184925e2df4f7ff21380c9
parentc5529d8979672d4cf92d4ba54ce01256ca1d0842 (diff)
downloadbcfg2-4f3cb4335c6d934c34d851efa587c525e6fcd876.tar.gz
bcfg2-4f3cb4335c6d934c34d851efa587c525e6fcd876.tar.bz2
bcfg2-4f3cb4335c6d934c34d851efa587c525e6fcd876.zip
travis-ci: Cache wheels for python deps
The python dependencies are only build once to create the wheel and cached using the travis-ci infrastructure. All builds afterwards will be faster because the cached version is used.
-rw-r--r--.travis.yml1
-rwxr-xr-xtestsuite/install.sh18
2 files changed, 13 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index c8f0c4c71..f51637ccd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,6 +42,7 @@ addons:
cache:
directories:
- $HOME/.cache/pip
+ - $HOME/.cache/wheels
- $HOME/.cache/xml
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
diff --git a/testsuite/install.sh b/testsuite/install.sh
index 1c9cc36b9..eb569ec56 100755
--- a/testsuite/install.sh
+++ b/testsuite/install.sh
@@ -1,25 +1,31 @@
#!/bin/bash -ex
# install script for Travis-CI
+pip install --upgrade pip
-pip install -r testsuite/requirements.txt
+pip_wheel() {
+ pip wheel --find-links="$HOME/.cache/wheels/" --wheel-dir="$HOME/.cache/wheels/" "$@"
+ pip install --no-index --find-links="$HOME/.cache/wheels/" "$@"
+}
+
+pip_wheel -r testsuite/requirements.txt
PYVER=$(python -c 'import sys;print(".".join(str(v) for v in sys.version_info[0:2]))')
if [[ ${PYVER:0:1} == "2" && $PYVER != "2.7" ]]; then
- pip install unittest2
+ pip_wheel unittest2
fi
if [[ "$WITH_OPTIONAL_DEPS" == "yes" ]]; then
- pip install PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy cherrypy python-augeas
+ pip_wheel PyYAML pyinotify boto pylibacl Jinja2 mercurial guppy cherrypy python-augeas
if [[ ${PYVER:0:1} == "2" ]]; then
- pip install cheetah m2crypto
+ pip_wheel cheetah m2crypto
if [[ $PYVER != "2.7" ]]; then
- pip install 'django<1.7' 'South<0.8'
+ pip_wheel 'django<1.7' 'South<0.8'
else
- pip install django
+ pip_wheel django
fi
fi
fi