summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDwayne Litzenberger <dlitz@dlitz.net>2016-04-01 20:03:13 -0700
committerDwayne Litzenberger <dlitz@dlitz.net>2016-04-01 20:03:13 -0700
commit279d97a2c081a1713a3d3826d16158e437a2a5fc (patch)
treec8d7610171b47f60fddff94d083bb8e4477637f0
parent79665f1a3c04ae836b7e917d753f2572807a62fd (diff)
downloadpycrypto-279d97a2c081a1713a3d3826d16158e437a2a5fc.tar.gz
travis: caching
-rw-r--r--.travis.yml18
1 files changed, 11 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml
index ac9a79e..aee9807 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,8 @@
# PyCrypto .travis.yml file, for travis-ci.org testing.
# See https://travis-ci.org/dlitz/pycrypto for build status.
+cache:
+ directories:
+ - $HOME/.pyenv/cache
env:
- PYENV_VERSION=2.1.3
- PYENV_VERSION=2.2.3
@@ -39,14 +42,15 @@ before_install:
# Install some package dependencies
- sudo apt-get -qq update
- sudo apt-get -qq install libgmp-dev
- # Download pyenv
- - pyenv_uri=https://github.com/yyuu/pyenv/archive/b55ac8cd7822bf7c5bf7b791239f5ae7aa7be364.tar.gz
- - pyenv_basename=$( basename "$pyenv_uri" .tar.gz )
- - wget ${pyenv_uri}
- - echo "f3a7c9688b2de7f68855aa3ff5da3be421bf36b4470ebbeb51f2748c2fc984d3 *${pyenv_basename}.tar.gz" | sha256sum -c -
+ # Create pyenv cache directory if it doesn't already exist.
+ - mkdir -p ~/.pyenv/cache
+ # Download and verify pyenv, or use cached version if available.
+ - pyenv_uri=https://github.com/yyuu/pyenv/archive/v20160310.tar.gz
+ - pyenv_tarball="$HOME/.pyenv/cache/pyenv-$( basename "$pyenv_uri" )"
+ - echo "886e386110bc24e4bfdd560bff0b22db34627fe4be203eacd28ca9e9c2491fcf *${pyenv_tarball}" | sha256sum -c - >/dev/null 2>&1 || wget -o "$pyenv_tarball" -c "$pyenv_uri"
+ - echo "886e386110bc24e4bfdd560bff0b22db34627fe4be203eacd28ca9e9c2491fcf *${pyenv_tarball}" | sha256sum -c -
# Install pyenv into ~/.pyenv and load it
- - tar -xvzf ${pyenv_basename}.tar.gz
- - mv -f pyenv-${pyenv_basename} ~/.pyenv
+ - tar --strip-components=1 -C ~/.pyenv -xvzf ${pyenv_basename}.tar.gz
- export PATH=~/.pyenv/bin:$PATH
- eval "$(pyenv init -)"
# If the selected Python version is installed locally, activate it. Otherwise, build it using pyenv.