Skip to content

Commit d890549

Browse files
author
y-p
committed
Merge pull request #6227 from y-p/PR_travis3
BLD: fix travis speedup
2 parents ff3c173 + c50ef07 commit d890549

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ install:
6767
- echo "install"
6868
- ci/prep_ccache.sh
6969
- ci/install.sh
70+
- ci/submit_ccache.sh
7071

7172
before_script:
7273
- mysql -e 'create database pandas_nosetest;'
@@ -79,4 +80,3 @@ after_script:
7980
- ci/print_versions.py
8081
- ci/print_skipped.py /tmp/nosetests.xml
8182
- ci/after_script.sh
82-
- ci/submit_ccache.sh

ci/install.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,9 @@ fi
9494
time python setup.py sdist
9595
pip uninstall cython -y
9696

97-
cat pandas/version.py
98-
9997
export PATH=/usr/lib/ccache:/usr/lib64/ccache:$PATH
10098
which gcc
101-
ccache -z # reset stats
99+
ccache -z
102100
time pip install $(find dist | grep gz | head -n 1)
103101

104102
true

ci/ironcache/get.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@
77
import time
88
import json
99
import base64
10-
10+
from hashlib import sha1
1111
from iron_cache import *
1212

13-
key='KEY'+os.environ.get('JOB_NAME','')+"."
13+
key='KEY.%s.%s' %(os.environ.get('TRAVIS_REPO_SLUG','unk'),
14+
os.environ.get('JOB_NAME','unk'))
15+
if sys.version_info[0] > 2:
16+
key = sha1(bytes(key,encoding='utf8')).hexdigest()[:8]+'.'
17+
else:
18+
key = sha1(key).hexdigest()[:8]+'.'
1419

1520
b = b''
1621
cache = IronCache()

ci/ironcache/put.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@
77
import time
88
import json
99
import base64
10-
10+
from hashlib import sha1
1111
from iron_cache import *
1212

13-
key='KEY'+os.environ.get('JOB_NAME','')+"."
13+
key='KEY.%s.%s' %(os.environ.get('TRAVIS_REPO_SLUG','unk'),
14+
os.environ.get('JOB_NAME','unk'))
15+
if sys.version_info[0] > 2:
16+
key = sha1(bytes(key,encoding='utf8')).hexdigest()[:8]+'.'
17+
else:
18+
key = sha1(key).hexdigest()[:8]+'.'
19+
1420
os.chdir(os.environ.get('HOME'))
1521

1622
cache = IronCache()

ci/prep_ccache.sh

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ if [ "$IRON_TOKEN" ]; then
88

99
python ci/ironcache/get.py
1010
ccache -C
11-
ccache -M 120M
1211

1312
if [ -f ~/ccache.7z ]; then
1413
echo "Cache retrieved"

0 commit comments

Comments
 (0)