diff --git a/.travis.yml b/.travis.yml index a635480d74196..f5785f5039c4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,6 +67,7 @@ install: - echo "install" - ci/prep_ccache.sh - ci/install.sh + - ci/submit_ccache.sh before_script: - mysql -e 'create database pandas_nosetest;' @@ -79,4 +80,3 @@ after_script: - ci/print_versions.py - ci/print_skipped.py /tmp/nosetests.xml - ci/after_script.sh - - ci/submit_ccache.sh diff --git a/ci/install.sh b/ci/install.sh index 424284a5288ec..53994f2659952 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -94,11 +94,9 @@ fi time python setup.py sdist pip uninstall cython -y -cat pandas/version.py - export PATH=/usr/lib/ccache:/usr/lib64/ccache:$PATH which gcc -ccache -z # reset stats +ccache -z time pip install $(find dist | grep gz | head -n 1) true diff --git a/ci/ironcache/get.py b/ci/ironcache/get.py index bfbaa34b6757c..45ce4165cea76 100644 --- a/ci/ironcache/get.py +++ b/ci/ironcache/get.py @@ -7,10 +7,15 @@ import time import json import base64 - +from hashlib import sha1 from iron_cache import * -key='KEY'+os.environ.get('JOB_NAME','')+"." +key='KEY.%s.%s' %(os.environ.get('TRAVIS_REPO_SLUG','unk'), + os.environ.get('JOB_NAME','unk')) +if sys.version_info[0] > 2: + key = sha1(bytes(key,encoding='utf8')).hexdigest()[:8]+'.' +else: + key = sha1(key).hexdigest()[:8]+'.' b = b'' cache = IronCache() diff --git a/ci/ironcache/put.py b/ci/ironcache/put.py index 06d8896b289d5..0faf173483f23 100644 --- a/ci/ironcache/put.py +++ b/ci/ironcache/put.py @@ -7,10 +7,16 @@ import time import json import base64 - +from hashlib import sha1 from iron_cache import * -key='KEY'+os.environ.get('JOB_NAME','')+"." +key='KEY.%s.%s' %(os.environ.get('TRAVIS_REPO_SLUG','unk'), + os.environ.get('JOB_NAME','unk')) +if sys.version_info[0] > 2: + key = sha1(bytes(key,encoding='utf8')).hexdigest()[:8]+'.' +else: + key = sha1(key).hexdigest()[:8]+'.' + os.chdir(os.environ.get('HOME')) cache = IronCache() diff --git a/ci/prep_ccache.sh b/ci/prep_ccache.sh index ffff9d7ac0a37..843e94d4733c0 100755 --- a/ci/prep_ccache.sh +++ b/ci/prep_ccache.sh @@ -8,7 +8,6 @@ if [ "$IRON_TOKEN" ]; then python ci/ironcache/get.py ccache -C - ccache -M 120M if [ -f ~/ccache.7z ]; then echo "Cache retrieved"