-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Travis: switch to trusty, pip and libc++ caching, pypy numpy #798
Conversation
And another spurious appveyor failure. :( |
This looks great! (+1 for testing NumPy with PyPy). I restarted the AppVeyor build. |
Awesome overhaul! Just one small issue: pybind11's minimum supported CMake version 2.8.12 is no longer being tested anywhere. I guess this can be easily fixed by reverting |
.travis.yml
Outdated
$PY_CMD -m pip install --user --upgrade --quiet numpy pytest | ||
echo -e "done.\nInstalling scipy..." | ||
$PY_CMD -m pip install --user --upgrade --quiet scipy | ||
echo "done." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are pytest/numpy/scipy installed in two stages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a failure at one point when installing both at the same time, which looked like pip had tried to build scipy without numpy being installed yet. It didn't actually complete fail: it seemed as though pip then installed numpy, and ran the scipy build again in the same command.
I can't reproduce this locally now, however, so I'll go ahead and recombine them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... it also apparently prevented a travis no-output-for-10-minute failure, but I've added a travis-specific fix for that.
d621d54
to
d9e8e50
Compare
Good point about cmake: I hadn't intended that. Trusty itself has cmake 2.8.12, but the travis trusty environment has a ppa-upgraded version. I've updated the first two builds to downgrade to the system version during initialization. |
d9e8e50
to
86179cd
Compare
This applies several changes to the non-docker travis-ci builds: - Make all builds use trusty rather than precise. pybind can't really build in precise anyway (we install essentially the entire toolchain backported from trusty on every build), and so this saves needing to install all the backported packages during the build setup. - Updated the 3.5 build to 3.6 (via deadsnakes, which didn't backport 3.6 to ubuntu releases earlier than trusty). - As a result of the switch to trusty, the BAREBONES build now picks up the (default installed) python 3.5 installation. - Invoke pip everywhere via $PYTHON -m pip rather than the pip executable, which saves us having to figure out what the pip executable is, and ensures that we are using the correct pip. - Install packages with `pip --user` rather than in a virtualenv. - Add the local user python package archive to the travis-ci cache (rather than the pip cache). This saves needing to install packages during installation (unless there are updates, in which case the package and the cache are updated). - Install numpy and scipy on the pypy build. This has to build from source (and so blas and fortran need to be installed on the build), but given the above caching, the build will only be slow for the first build after a new numpy/scipy release. This testing is valuable: numpy has various behaviour differences under pypy. - Added set -e/+e around the before_install/install blocks so that a failure here (e.g. a pip install failure or dependency download failure) triggers a build failure. - Update eigen version to latest (3.3.3), mainly to be consistent with the appveyor build. - The travis trusty environment has an upgraded cmake, so this downgrades cmake (to the stock trusty version) on the first couple jobs so that we're still including some cmake 2.8.12 testing.
This uses the trusty container rather than docker for the clang 4.0 build. It also caches the local libc++ installation so that it doesn't need to be compiled every time, which should speed up the job considerably.
Various bash variables that are only used in the travis-ci script and don't need to propagate (e.g. to cmake) are being pointlessly exported; this removes these `export`s.
Adding numpy to the pypy test exposed a segfault caused by the buffer tests in test_stl_binders.py: the first such test was explicitly skipped on pypy, but the second (test_vector_buffer_numpy) which also seems to cause an occasional segfault was just marked as requiring numpy. Explicitly skip it on pypy as well (until a workaround, fix, or pypy fix are found).
86179cd
to
0feecb9
Compare
This applies several changes to the non-docker (and the C++17 clang docker) travis-ci builds:
pip
is now invoked everywhere via$PY_CMD -m pip
(wherePY_CMD
is the python binary name) rather than thepip
executable, which saves us having to figure out what the pip executable is (e.g.pip
vspip3
), and ensures that we are always using the correctpip
.pip --user
rather than in a virtualenv. This makes the caching a bit easier: we can just cache~/.local/{lib,bin}
. (We could alternatively cache avirtualenv
directory, but caching things under .local/ make it easier to also cache the local libc++ install, below).set -e
/+e
around the before_install/install blocks so that a failure here (e.g. a pip install failure or dependency download failure) triggers a build failure. Previously such failures during dependency installation were just silently ignored.export
s on script variables (e.g.PY
,GCC
) which are just local script variables that don't need to be exported. The remainingexport
s are only for things likeCXX
which we do need to be exported to cmake.