Skip to content
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

Configure tests on Travis and AppVeyor #14

Merged
merged 5 commits into from
Jun 12, 2016
Merged

Conversation

dean0x7d
Copy link
Member

As discussed in pybind/cmake_example#4, this adds .travis.yml and .appveyor.yml configurations to test the build using pip and conda.

You'll need to activate the two services for this repository. These are just the config files.
For a sample of the test output, see the logs from my fork:
https://travis-ci.org/dean0x7d/python_example
https://ci.appveyor.com/project/dean0x7d/python-example

It tests a large number of configurations: pip and conda, 2.7 and 3.5, Linux, OS X and Windows x86/x64. This has revealed a few issues. I fixed each one in a separate commit for clarity. Let me know if there is a better solution for any of those, I'm not that familiar with conda-build so I may have worked around something obvious.

The only issue I wasn't able to resolve is Conda 2.7-x86 on Windows. I have no idea why it doesn't build and I can't reproduce the issue on my local VM. For now, I've placed this particular configuration under allow_failures on AppVeyor.

One last thing: the conda tests are configured to fetch pybind11 from the conda-forge channel. I originally used the pybind channel, but this resulted in a crash with Conda 2.7 on Linux and OS X. I have no idea why that was, conda-build would either crash or loop endlessly. In any case, switching to the conda-forge version resolved it.

@wjakob
Copy link
Member

wjakob commented Jun 12, 2016

LGTM, thanks -- I will activate the build services in a sec.

@wjakob wjakob merged commit 7ad3847 into pybind:master Jun 12, 2016
@wjakob
Copy link
Member

wjakob commented Jun 12, 2016

Appveyor (https://ci.appveyor.com/project/wjakob/python-example) and Travis (https://travis-ci.org/pybind/python_example) are running.

One note: although it looks like the tests are passing, digging into the Travis logs shows that there are actually some failures while trying to build a wheel. Is this expected?

@dean0x7d
Copy link
Member Author

Yeah, I forgot to mention this. The wheel built fails and then it falls back to the regular build which succeeds.

This also happens on my local machine if the pybind11 python package isn't installed beforehand. I assumed that this is the intension: the user doesn't need to have pybind11 because it will be resolved at install-time in setup.py. But I guess the wheel build handles this differently compared to the regular build.

@@ -1,4 +1,5 @@
call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x64
if "%ARCH%" == "32" (set PLATFORM=x86) else (set PLATFORM=x64)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants