[MRG] Use ccache on Travis#9006
Conversation
build_tools/travis/install.sh
Outdated
| # Useful for debugging how ccache is used | ||
| # export CCACHE_LOGFILE=/tmp/ccache.log | ||
| # ~60M is used by .ccache when compiling from scratch at the time of writing | ||
| export CCACHE_MAXSIZE=100M |
There was a problem hiding this comment.
This is to prevent the cache size to go out of hand. This should allow for a little bit less than twice the size of the cache needed.
|
I pushed an empty commit to test that ccache was working as it should. |
880fa31 to
8b2157d
Compare
| # Useful for debugging how ccache is used | ||
| # export CCACHE_LOGFILE=/tmp/ccache.log | ||
| # ~60M is used by .ccache when compiling from scratch at the time of writing | ||
| ccache --max-size 100M --show-stats |
There was a problem hiding this comment.
What happened to the CXX environmental variable?
There was a problem hiding this comment.
I don't think it is needed. I certainly have come across SO answers that exactly say this, although nothing very authoritative.
side-comment: locally I don't need to set CC or CXX to have ccache working (you just add /usr/lib/ccache to PATH and that's it). I tried many different things to get it to work on Travis and that was one I found that was working.
There was a problem hiding this comment.
OK I googled again and although the situation is not very clear, I think it doesn't hurt to set CXX ...
although it does not seem to be necessary
|
LGTM, it seems to work, nice. |
|
I'll merge this one and promise to deal with the unexpected consequences if they arise. |
Use ccache and add .ccache to the Travis cache. This should save 2-4 minutes of compilation on each build that builds scikit-learn.
In some tests on Travis there seems to be some variability but here is what I found (I used
time python setup.py developto have a better idea about the timings):python setup.py developtakes 45s-1min (cython compilation)I tried many different things but for some reason just using "export PATH=/usr/lib/ccache:$PATH" as I do locally does not seem to be enough ...