diff --git a/.travis.yml b/.travis.yml index e034df2d5b3f6b8586f82e25bb5a7a347795913c..a35bbdd11f868c577c049c713258421b5276e820 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,4 @@ -language: python -sudo: required +language: cpp git: depth: false compiler: @@ -8,40 +7,55 @@ compiler: env: global: - secure: "SnIBG/xLIHX3CSvUbqqsX8xTVqIqQ7fFS6HWO6KZQVBsT6yugTwYHbyhNiU531JejYJ/I3ZrDhXfYH3qFZiYxnH1sifvwV+fnTtMXpPN7qPZwIymkjcmm6gJF51e0C7VOfUbvKFv0ngwj+ul21rgZSMuoEvxPK0WxtE3/ZSfn9c=" - - APT_DEPENDENCIES="doxygen libeigen3-dev libboost-test-dev libboost-python-dev" + - APT_DEPENDENCIES="doxygen libeigen3-dev libboost-test-dev libboost-python-dev python-numpy" - DEBSIGN_KEYID=5AE5CD75 - CC=gcc - DO_COVERAGE_ON_BRANCH="master;release" - DO_CPPCHECK_ON_BRANCH="" - DO_INSTALL_DOC_EXCEPT_ON_BRANCH="" - - BUILD_WITH_CATKIN_SUPPORT=false - MAKEFLAGS="-j2" jobs: include: - dist: bionic - env: BUILDTYPE=Release + env: + - BUILDTYPE=Release + - TRAVIS_PYTHON_VERSION=27 python: 2.7 - dist: bionic - env: BUILDTYPE=Release + env: + - BUILDTYPE=Release + - TRAVIS_PYTHON_VERSION=36 python: 3.6 - dist: bionic - env: BUILDTYPE=Debug + env: + - BUILDTYPE=Debug + - TRAVIS_PYTHON_VERSION=27 python: 2.7 - dist: bionic - env: BUILDTYPE=Debug + env: + - BUILDTYPE=Debug + - TRAVIS_PYTHON_VERSION=36 python: 3.6 - dist: xenial - env: BUILDTYPE=Release + env: + - BUILDTYPE=Release + - TRAVIS_PYTHON_VERSION=27 python: 2.7 - dist: xenial - env: BUILDTYPE=Release + env: + - BUILDTYPE=Release + - TRAVIS_PYTHON_VERSION=35 python: 3.5 - dist: trusty - env: BUILDTYPE=Release + env: + - BUILDTYPE=Release + - TRAVIS_PYTHON_VERSION=27 python: 2.7 - dist: trusty - env: BUILDTYPE=Release + env: + - BUILDTYPE=Release + - TRAVIS_PYTHON_VERSION=34 python: 3.4 notifications: @@ -52,8 +66,8 @@ branches: - master - debian - devel -before_install: ./.travis/run before_install -install: pip install coveralls numpy +before_install: ./travis_custom/custom_before_install +install: pip install coveralls numpy --user script: - export CMAKE_ADDITIONAL_OPTIONS="-DCMAKE_BUILD_TYPE=${BUILDTYPE}" - ./.travis/run ../travis_custom/custom_build @@ -61,7 +75,9 @@ script: - mkdir build - cd build - export CMAKE_PREFIX_PATH=/tmp/_ci/install - - cmake .. + - export PYTHON_DEFAULT_VERSION=$(which python2) + - if [[ $TRAVIS_PYTHON_VERSION -gt 30 ]]; then export PYTHON_DEFAULT_VERSION=$(which python3); fi + - cmake .. -DPYTHON_EXECUTABLE=$PYTHON_DEFAULT_VERSION - make - ./extra_lib - cd /tmp/_ci/build diff --git a/cmake b/cmake index 61344038b1352d5a8de1e20db710c83be805d2eb..31f4a95eec3cc5fc63e37c5af3eb352b86c29293 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 61344038b1352d5a8de1e20db710c83be805d2eb +Subproject commit 31f4a95eec3cc5fc63e37c5af3eb352b86c29293 diff --git a/package.xml b/package.xml index 085b7f2a5bcafa4cab4f3b48999dc3b1e1bd36eb..3596aa8083badbeb723444bc9c0056f00af12b5a 100644 --- a/package.xml +++ b/package.xml @@ -1,7 +1,7 @@ <?xml version="1.0"?> <package format="2"> <name>eigenpy</name> - <version>2.0.2</version> + <version>2.0.3</version> <description>Bindings between Numpy and Eigen using Boost.Python</description> <maintainer email="justin.carpentier@inria.fr">Justin Carpentier</maintainer> <maintainer email="wolfgang.merkt@ed.ac.uk">Wolfgang Merkt</maintainer> diff --git a/travis_custom/custom_before_install b/travis_custom/custom_before_install new file mode 100755 index 0000000000000000000000000000000000000000..9fbf67f3a6737793c537863274f5c8b3df5a6af5 --- /dev/null +++ b/travis_custom/custom_before_install @@ -0,0 +1,14 @@ +#!/bin/bash + +# Add Python dependency +echo "TRAVIS_PYTHON_VERSION=$TRAVIS_PYTHON_VERSION" +if [[ $TRAVIS_PYTHON_VERSION -gt 30 ]]; then + export APT_DEPENDENCIES=$APT_DEPENDENCIES" python3-numpy" +fi + +# When this script is called the current directory is ./custom_travis +. ./.travis/run ../.travis/before_install + +# Git fetch tags +git fetch --tags + diff --git a/travis_custom/custom_build b/travis_custom/custom_build index 3c7d80ecdf63b723e0ce4ee8d06f2c18db0fdf9f..9874b08911860d82c03b44039dcf99d1b55b3b9c 100755 --- a/travis_custom/custom_build +++ b/travis_custom/custom_build @@ -2,13 +2,17 @@ set -e # Setup environment variables. -export CMAKE_ADDITIONAL_OPTIONS=" ${CMAKE_ADDITIONAL_OPTIONS} -DBUILD_BENCHMARK=\"ON\" -DBUILD_UNIT_TESTS=\"ON\" -DCMAKE_CXX_FLAGS=-DBOOST_SYSTEM_NO_DEPRECATED -DPYTHON_EXECUTABLE=$(which python)" +export CMAKE_ADDITIONAL_OPTIONS=" ${CMAKE_ADDITIONAL_OPTIONS} -DBUILD_BENCHMARK=\"ON\" -DBUILD_TESTING=\"ON\" -DCMAKE_CXX_FLAGS=-DBOOST_SYSTEM_NO_DEPRECATED" if [[ ";${DO_INSTALL_DOC_EXCEPT_ON_BRANCH};" == *";${CI_BRANCH};"* ]]; then export CMAKE_ADDITIONAL_OPTIONS=" ${CMAKE_ADDITIONAL_OPTIONS} -DINSTALL_DOCUMENTATION=\"OFF\"" else export CMAKE_ADDITIONAL_OPTIONS=" ${CMAKE_ADDITIONAL_OPTIONS} -DINSTALL_DOCUMENTATION=\"ON\"" fi +if [[ $TRAVIS_PYTHON_VERSION -gt 30 ]]; then + export CMAKE_ADDITIONAL_OPTIONS=" ${CMAKE_ADDITIONAL_OPTIONS} -DPYTHON_EXECUTABLE=$(which python3)" +fi + # Setup environment variables. . ./.travis/run ../.travis/build