Skip to content

BLD: re cythonize files only if we have changed then #6285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 6, 2014
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