Better travis python testing.

This commit is contained in:
Davis King 2017-12-10 15:33:46 -05:00
parent a80f31a8f6
commit 7d3397db5b
2 changed files with 12 additions and 1 deletions

View File

@ -60,6 +60,8 @@ matrix:
- boost-latest
packages:
- libboost-python1.55-dev
- python3
- python3-pip
- *gcc5_pkgs
cache:

View File

@ -16,16 +16,25 @@ if [ "$VARIANT" = "examples" ]; then
fi
if [ "$VARIANT" = "python-api" ]; then
../cmake/bin/cmake ../tools/python -DCMAKE_BUILD_TYPE=Release
../cmake/bin/cmake --build . --target install -- -j 2
../python_examples/svm_rank.py
rm -rf *
pip install --user numpy
../cmake/bin/cmake ../tools/python -DCMAKE_BUILD_TYPE=Release
../cmake/bin/cmake --build . --target install -- -j 2
../python_examples/svm_rank.py
fi
if [ "$VARIANT" = "python3-api" ]; then
../cmake/bin/cmake ../tools/python -DPYTHON3=ON -DCMAKE_BUILD_TYPE=Release
../cmake/bin/cmake --build . --target install -- -j 2
python3 ../python_examples/svm_rank.py
pip3 install --user numpy
rm -rf *
../cmake/bin/cmake ../tools/python -DPYTHON3=ON -DCMAKE_BUILD_TYPE=Release
../cmake/bin/cmake --build . --target install -- -j 2
python3 ../python_examples/svm_rank.py
fi