Skip to content

Commit 36435bf

Browse files
committed
BLD: fix caching 3
1 parent 45e66eb commit 36435bf

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

ci/install.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,14 @@ fi
146146

147147

148148
# set the compiler cache to work
149-
export PATH=/usr/lib/ccache:/usr/lib64/ccache:$PATH
150-
which gcc
149+
if [ "$IRON_TOKEN" ]; then
150+
export PATH=/usr/lib/ccache:/usr/lib64/ccache:$PATH
151+
gcc=$(which gcc)
152+
echo "gcc: $gcc"
153+
ccache=$(which ccache)
154+
echo "ccache: $ccache"
155+
export CC='ccache gcc'
156+
fi
151157

152158
# build pandas
153159
time python setup.py sdist

ci/prep_ccache.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
if [ "$IRON_TOKEN" ]; then
44

5+
home_dir=$(pwd)
6+
57
# install the compiler cache
68
sudo apt-get $APT_ARGS install ccache p7zip-full
79
# iron_cache, pending py3 fixes upstream
810
pip install -I --allow-external --allow-insecure git+https://github.com/iron-io/iron_cache_python.git@8a451c7d7e4d16e0c3bedffd0f280d5d9bd4fe59#egg=iron_cache
911

10-
11-
curdir=$(pwd)
1212
python ci/ironcache/get.py
1313
ccache -C
1414

@@ -27,7 +27,7 @@ if [ "$IRON_TOKEN" ]; then
2727
fi
2828

2929
# did the last commit change cython files?
30-
cd $curdir
30+
cd $home_dir
3131

3232
retval=$(git diff HEAD~3 --numstat | grep -P "pyx|pxd"|wc -l)
3333
echo "number of cython files changed: $retval"

ci/submit_ccache.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22

3+
home_dir=$(pwd)
34
ccache -s
45

56
MISSES=$(ccache -s | grep "cache miss" | grep -Po "\d+")
@@ -11,17 +12,20 @@ if [ x"$MISSES" == x"0" ]; then
1112
fi
1213

1314
if [ "$IRON_TOKEN" ]; then
14-
rm -rf ~/ccache.7z
1515

16-
tar cf - $HOME/.ccache \
16+
cd $HOME
17+
rm -rf ccache.7z
18+
19+
tar cf - .ccache \
1720
"$TRAVIS_BUILD_DIR"/pandas/{index,algos,lib,tslib,parser,hashtable}.c \
1821
"$TRAVIS_BUILD_DIR"/pandas/src/{sparse,testing}.c \
1922
"$TRAVIS_BUILD_DIR"/pandas/msgpack.cpp \
20-
| 7za a -si ~/ccache.7z
23+
| 7za a -si ccache.7z
2124

22-
split -b 500000 -d ~/ccache.7z ~/ccache.
25+
split -b 500000 -d ccache.7z ccache.
2326

2427
python ci/ironcache/put.py
28+
cd $home_dir
2529
fi;
2630

2731
exit 0

0 commit comments

Comments
 (0)