From 0a8d583cd02550c08a2f0bd87eeb6af2254d73ab Mon Sep 17 00:00:00 2001 From: Dean Moldovan Date: Sat, 4 Jun 2016 16:23:04 +0200 Subject: [PATCH] Improve CI tests - Test sdist package on all platforms - Include Python 2.7 and 32-bit versions on Windows --- .appveyor.yml | 9 ++++++--- .travis.yml | 5 +++-- MANIFEST.in | 4 ++++ test.py | 3 --- tests/test.py | 3 +++ 5 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 MANIFEST.in delete mode 100644 test.py create mode 100644 tests/test.py diff --git a/.appveyor.yml b/.appveyor.yml index 5c1d56e..0c6d117 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,11 +2,14 @@ version: 1.0.{build} image: Visual Studio 2015 environment: matrix: + - PATH: C:\Python27\;C:\Python27\Scripts\;%PATH% + - PATH: C:\Python27-x64\;C:\Python27-x64\Scripts\;%PATH% + - PATH: C:\Python35\;C:\Python35\Scripts\;%PATH% - PATH: C:\Python35-x64\;C:\Python35-x64\Scripts\;%PATH% - - PATH: C:\Miniconda35-x64\;C:\Miniconda35-x64\Scripts\;%PATH% install: - cmd: git submodule update -q --init --recursive build_script: -- cmd: pip install . +- cmd: python setup.py sdist +- cmd: pip install dist\cmake_example-0.0.1.zip test_script: -- cmd: python test.py +- cmd: python tests\test.py diff --git a/.travis.yml b/.travis.yml index b2bd571..943df2c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ before_install: - virtualenv -p python$PYTHON venv - source venv/bin/activate install: -- pip install . +- python setup.py sdist +- pip install dist/*.tar.gz script: -- python test.py +- python tests/test.py diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..99c01b3 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,4 @@ +include README.md LICENSE +global-include CMakeLists.txt *.cmake +recursive-include src * +recursive-include pybind11/include *.h diff --git a/test.py b/test.py deleted file mode 100644 index dbdedcc..0000000 --- a/test.py +++ /dev/null @@ -1,3 +0,0 @@ -import cmake_example - -print(cmake_example.add(1, 2)) diff --git a/tests/test.py b/tests/test.py new file mode 100644 index 0000000..4d11657 --- /dev/null +++ b/tests/test.py @@ -0,0 +1,3 @@ +from cmake_example import add + +assert add(1, 2) == 3