Add Cython CI

release/4.3a0
Fan Jiang 2020-02-11 14:43:56 -05:00
parent dfc0529dce
commit 82f4f11df7
2 changed files with 37 additions and 0 deletions

29
.travis.python.sh Normal file
View File

@ -0,0 +1,29 @@
#!/bin/bash
set -x
# Install a system package required by our library
sudo apt-get install wget libicu libicu-dev
CURRDIR=$(pwd)
mkdir $CURRDIR/build
cd $CURRDIR/build
cmake $CURRDIR -DCMAKE_BUILD_TYPE=Release \
-DGTSAM_BUILD_TESTS=OFF -DGTSAM_BUILD_UNSTABLE=ON \
-DGTSAM_USE_QUATERNIONS=OFF \
-DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF \
-DGTSAM_INSTALL_CYTHON_TOOLBOX=ON \
-DGTSAM_PYTHON_VERSION=Default \
-DGTSAM_ALLOW_DEPRECATED_SINCE_V4=OFF \
-DCMAKE_INSTALL_PREFIX=$CURRDIR/../gtsam_install
make -j$(nproc) install
cd $CURRDIR/../gtsam_install/cython
sudo python setup.py install
cd $CURRDIR/cython/gtsam/tests
python -m unittest discover

View File

@ -122,3 +122,11 @@ jobs:
compiler: clang
env: CC=clang-9 CXX=clang++-9 CMAKE_BUILD_TYPE=Release GTSAM_BUILD_UNSTABLE=OFF GTSAM_USE_QUATERNIONS=ON
script: bash .travis.sh -t
- stage: special
os: linux
compiler: gcc
script: bash .travis.python.sh
- stage: special
os: osx
compiler: clang
script: bash .travis.python.sh