Skip to content

Commit

Permalink
BLD: cython caches fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jreback committed Feb 7, 2014
1 parent db2f6d9 commit efa63b1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ci/prep_ccache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ if [ "$IRON_TOKEN" ]; then
python ci/ironcache/get.py
ccache -C

clear_cache=0
if [ -f ~/ccache.7z ]; then
echo "Cache retrieved"
clear_cache=1
cd $HOME
7za e $HOME/ccache.7z
# ls -l $HOME
Expand All @@ -25,13 +27,13 @@ if [ "$IRON_TOKEN" ]; then
# did the last commit change cython files?
cd $curdir

echo "diff from HEAD~5"
git diff HEAD~5 --numstat
echo "diff from HEAD"
git diff HEAD~3 --numstat

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

if [ $retval -eq 0 ]
if [ $clear_cache -eq 1 ] && [ $retval -eq 0 ]
then
# nope, reuse cython files
echo "Will reuse cached cython file"
Expand Down

0 comments on commit efa63b1

Please sign in to comment.