diff options
author | Dwayne Litzenberger <dlitz@dlitz.net> | 2016-04-01 21:24:16 -0700 |
---|---|---|
committer | Dwayne Litzenberger <dlitz@dlitz.net> | 2016-04-01 21:24:16 -0700 |
commit | 560d4dc72a1a237ca55155374ab81223fffd9732 (patch) | |
tree | 772804fc2bacc222d6526ffcfb957870a7f8be34 | |
parent | b06170ebd99136ddea21932d631c0ab8bd37d342 (diff) | |
download | pycrypto-560d4dc72a1a237ca55155374ab81223fffd9732.tar.gz |
more caching
-rw-r--r-- | .travis.yml | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml index 3700697..1fd549e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,6 @@ cache: pip: true directories: - $HOME/.pyenv/cache - - $HOME/.pyenv/versions env: - PYENV_VERSION=2.1.3 - PYENV_VERSION=2.2.3 @@ -63,18 +62,18 @@ before_install: - export PATH=~/.pyenv/bin:$PATH - eval "$(pyenv init -)" # If the selected Python version is installed locally (travis-ci native), activate it. - # Otherwise, install it using pyenv (if not already installed) and set up a separate (uncached) virtualenv. + # If there's a cached Python that's already been built, extract it. + # Otherwise, install it using pyenv (if not already installed), and then make a cache tarball. - |- if [ -e ~/virtualenv/python"$PYENV_VERSION"/bin/activate ] ; then . ~/virtualenv/python"$PYENV_VERSION"/bin/activate unset PYENV_VERSION + elif [ -e ~/.pyenv/cache/built-"$PYENV_VERSION".tar.gz.done ]; then + tar --strip-components=1 -C ~/.pyenv/versions/"${PYENV_VERSION}" -xvzf ~/.pyenv/cache/built-"$PYENV_VERSION".tar.gz else - if ! pyenv version 2>/dev/null; then - pyenv install "$PYENV_VERSION" - pip install --upgrade pip setuptools wheel virtualenv - fi - virtualenv --never-download ~/uncached-virtualenv - . ~/uncached-virtualenv/activate + pyenv install "$PYENV_VERSION" + tar -C ~/.pyenv/versions -cvzf ~/.pyenv/cache/built-"$PYENV_VERSION".tar.gz "$PYENV_VERSION" + touch ~/.pyenv/cache/built-"$PYENV_VERSION".tar.gz.done fi script: - "major_version=$( python -V 2>&1 | cut -d' ' -f2 | cut -d. -f1 )" |