diff --git a/.travis.python.sh b/.travis.python.sh new file mode 100644 index 000000000..d4f65fd9b --- /dev/null +++ b/.travis.python.sh @@ -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 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 14fe66ac1..0afe7a43e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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