Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3409e71

Browse files
author
y-p
committedFeb 1, 2014
Merge pull request #6220 from y-p/PR_fast_travis2
BLD: more fast travis
2 parents 83f7679 + 832b67c commit 3409e71

File tree

2 files changed

+24
-15
lines changed

2 files changed

+24
-15
lines changed
 

‎ci/prep_ccache.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if [ "$IRON_TOKEN" ]; then
88

99
python ci/ironcache/get.py
1010
ccache -C
11-
ccache -M 60M
11+
ccache -M 120M
1212

1313
if [ -f ~/ccache.7z ]; then
1414
echo "Cache retrieved"
@@ -21,6 +21,17 @@ if [ "$IRON_TOKEN" ]; then
2121
rm -rf $HOME/ccache
2222

2323
fi
24+
25+
# did the last commit change cython files?
26+
git show --pretty="format:" --name-only HEAD~5.. --first-parent | grep -P "pyx|pxd"
27+
28+
if [ "$?" != "0" ]; then
29+
# nope, reuse cython files
30+
echo "Will reuse cached cython file"
31+
touch "$TRAVIS_BUILD_DIR"/pandas/*.c
32+
touch "$TRAVIS_BUILD_DIR"/pandas/src/*.c
33+
touch "$TRAVIS_BUILD_DIR"/pandas/*.cpp
34+
fi
2435
fi
2536

2637
exit 0

‎ci/submit_ccache.sh

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@
22

33
ccache -s
44

5+
MISSES=$(ccache -s | grep "cache miss" | grep -Po "\d+")
6+
echo "MISSES: $MISSES"
7+
8+
if [ x"$MISSES" == x"0" ]; then
9+
echo "No cache misses detected, skipping upload"
10+
exit 0
11+
fi
12+
513
if [ "$IRON_TOKEN" ]; then
614
rm -rf ~/ccache.7z
715

816
tar cf - $HOME/.ccache \
9-
| 7za a -si ~/ccache.7z
10-
11-
# Caching the cython files could be be made to work.
12-
# There's a timestamp issue to be handled (http://stackoverflow.com/questions/1964470)
13-
# but you could get the build to reuse them.
14-
# However, there's a race condition between travis cythonizing
15-
# and a new commit being made on a GH server somewhere.
16-
# and there's convenient causal link between the two we can
17-
# take advantage of.
18-
# Let's just wait another 60 seconds.
19-
# "$TRAVIS_BUILD_DIR"/pandas/{index,algos,lib,tslib,parser,hashtable}.c \
20-
# "$TRAVIS_BUILD_DIR"/pandas/src/{sparse,testing}.c \
21-
# "$TRAVIS_BUILD_DIR"/pandas/msgpack.cpp \
22-
# | 7za a -si ~/ccache.7z
17+
"$TRAVIS_BUILD_DIR"/pandas/{index,algos,lib,tslib,parser,hashtable}.c \
18+
"$TRAVIS_BUILD_DIR"/pandas/src/{sparse,testing}.c \
19+
"$TRAVIS_BUILD_DIR"/pandas/msgpack.cpp \
20+
| 7za a -si ~/ccache.7z
2321

2422
split -b 500000 -d ~/ccache.7z ~/ccache.
2523

0 commit comments

Comments
 (0)
Please sign in to comment.