Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions ci/prep_ccache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ if [ "$IRON_TOKEN" ]; then
pip install -I --allow-external --allow-insecure git+https://github.com/iron-io/iron_cache_python.git@8a451c7d7e4d16e0c3bedffd0f280d5d9bd4fe59#egg=iron_cache


curdir=$(pwd)
python ci/ironcache/get.py
ccache -C

Expand All @@ -22,14 +23,23 @@ if [ "$IRON_TOKEN" ]; then
fi

# did the last commit change cython files?
git diff HEAD~5 | grep diff | grep -P "pyx|pxd"
cd $curdir

if [ "$?" != "0" ]; then
echo "diff from HEAD~5"
git diff HEAD~5 --numstat

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

if [ $retval -eq 0 ]
then
# nope, reuse cython files
echo "Will reuse cached cython file"
touch "$TRAVIS_BUILD_DIR"/pandas/*.c
touch "$TRAVIS_BUILD_DIR"/pandas/src/*.c
touch "$TRAVIS_BUILD_DIR"/pandas/*.cpp
else
echo "Rebuilding cythonized files"
fi
fi

Expand Down