Skip to content

Commit

Permalink
Travis: add python variants
Browse files Browse the repository at this point in the history
  • Loading branch information
Clement Champetier committed Aug 21, 2015
1 parent 2672825 commit 109f0c4
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
15 changes: 10 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ env:
- TUTTLE_INSTALL=${TRAVIS_BUILD_DIR}/install-tuttle
- TUTTLE_DEPLOY=tuttle-${_system_name}-${_system_version}-${_system_arch}
- CI_NODE_TOTAL=2
matrix:
- PYTHON_VERSION=2.7
- PYTHON_VERSION=3.2

matrix:
allow_failures:
# we exceed the time limit
- os: osx
fast_finish: true

# This results in a 2×2 build matrix.
# Where the variables are: os / compiler
# This results in a 2×2x2 build matrix.
# Where the variables are: os / compiler / python version

cache:
# Caching Ubuntu packages
Expand Down Expand Up @@ -70,13 +73,15 @@ after_failure:

addons:
apt:
sources: ['boost-latest', 'kalakris-cmake', 'kubuntu-backports']
sources: ['boost-latest', 'kalakris-cmake', 'kubuntu-backports', 'pythonxy-devel']
packages:
- cmake
- cmake
- swig
- libboost1.55-all-dev
- python-dev
- python-numpy
- python3-dev
- python3-nose
- libfreetype6-dev
- libbz2-dev
- libltdl-dev
Expand Down Expand Up @@ -124,7 +129,7 @@ deploy:
provider: releases
api_key:
secure: ${GITHUB_RELEASE_API_KEY}
file: ${TUTTLE_DEPLOY}-${CC}.tgz
file: ${TUTTLE_DEPLOY}-${CC}-python-${PYTHON_VERSION}.tgz
skip_cleanup: true
on:
branch: master
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ endif()
add_custom_target(ofxplugins)

# Include subdirs
set(SEQUENCEPARSER_PYTHON_VERSION ${TUTTLE_PYTHON_VERSION})
add_subdirectory(libraries/sequenceParser)
add_subdirectory(libraries/tuttle)
add_subdirectory(applications)
Expand Down
2 changes: 1 addition & 1 deletion libraries/tuttle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ if (TuttleBoost_FOUND)
include(${SWIG_USE_FILE})

# Find python c libs
find_package(PythonLibs)
find_package(PythonLibs ${TUTTLE_PYTHON_VERSION})
include_directories(${PYTHON_INCLUDE_DIRS})

# Numpy
Expand Down
1 change: 1 addition & 0 deletions plugins/image/io/AudioVideo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if(FFMPEG_FOUND)
# Build avTranscoder library
set(AVTRANSCODER_DISABLE_APPS True)
set(AVTRANSCODER_DISABLE_BINDINGS True)
set(AVTRANSCODER_PYTHON_VERSION_OF_BINDING ${TUTTLE_PYTHON_VERSION})
add_subdirectory(avTranscoder)
endif(FFMPEG_FOUND)

Expand Down
2 changes: 1 addition & 1 deletion tools/travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi

# Build tuttle
cmake --version
cmake -DTUTTLE_EXPERIMENTAL=True -DCMAKE_INSTALL_PREFIX=${TUTTLE_INSTALL} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DWITHOUT_NUMPY=True -DTUTTLE_DEPLOY_DEPENDENCIES=True ..
cmake .. -DCMAKE_INSTALL_PREFIX=${TUTTLE_INSTALL} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DTUTTLE_EXPERIMENTAL=True -DWITHOUT_NUMPY=True -DTUTTLE_DEPLOY_DEPENDENCIES=True -DTUTTLE_PYTHON_VERSION=${PYTHON_VERSION}
make -j${CI_NODE_TOTAL} -k
make install
cd ..
9 changes: 7 additions & 2 deletions tools/travis/launch_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ set -x
# set env
export OFX_PLUGIN_PATH=${TUTTLE_INSTALL}/OFX
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${DEPENDENCIES_INSTALL}/lib:${TUTTLE_INSTALL}/lib
export PYTHONPATH=${TUTTLE_INSTALL}/lib/python2.7/site-packages:$PYTHONPATH
export PYTHONPATH=${TUTTLE_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH

# clone data for tests
git clone https://github.com/tuttleofx/TuttleOFX-data.git

# nosetests
ln -s ${TRAVIS_BUILD_DIR}/TuttleOFX-data ${TRAVIS_BUILD_DIR}/libraries/tuttle/pyTest/TuttleOFX-data
nosetests ${TRAVIS_BUILD_DIR}/libraries/tuttle/pyTest -v
if [[ ${PYTHON_VERSION} == "2.7" ]]; then
nosetests ${TRAVIS_BUILD_DIR}/libraries/tuttle/pyTest -v
elif [[ ${PYTHON_VERSION} == "3.2" ]]; then
python3 -m "nose" ${TRAVIS_BUILD_DIR}/libraries/tuttle/pyTest -v
fi


# boost unit tests
ln -s ${TRAVIS_BUILD_DIR}/TuttleOFX-data ${TRAVIS_BUILD_DIR}/testBin/TuttleOFX-data
Expand Down

0 comments on commit 109f0c4

Please sign in to comment.