Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Travis: update matrix to build with python 3.4 #555

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
language: cpp

# Use container-based infrastructure
sudo: false
sudo: required
dist: trusty

os:
- linux
Expand All @@ -25,7 +26,7 @@ env:
- CI_NODE_TOTAL=2
matrix:
- PYTHON_VERSION=2.7
- PYTHON_VERSION=3.2
- PYTHON_VERSION=3.4

matrix:
allow_failures:
Expand Down Expand Up @@ -84,19 +85,20 @@ addons:
- python-numpy
- python-nose
- python3-dev
- python3-numpy
- python3-setuptools
- python3-nose
- libfreetype6-dev
- libbz2-dev
- libltdl-dev
- libpng-dev
- libpng12-dev
- libjpeg-dev
- libraw-dev
- libglew-dev
- libtiff4-dev
- libilmbase-dev
- libopenexr-dev
# - libopenimageio-dev
- libopenimageio-dev
- libglew-dev
- libgraphviz-dev
- graphviz-dev
Expand All @@ -111,11 +113,14 @@ addons:
- libyaml-dev
- libopenctl0.8
- libcaca-dev
- libglui-dev
- freeglut3-dev
- libxi-dev
- libxmu-dev
- libtinyxml-dev
- yasm
- libx264-dev
- libxvidcore-dev
- libmagick++-dev
coverity_scan:
project:
name: "tuttleofx/TuttleOFX"
Expand Down
20 changes: 11 additions & 9 deletions applications/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ add_subdirectory(sam)
add_subdirectory(script)

# Edit python scripts if the host is built with python3
if(${TUTTLE_PYTHON_VERSION} VERSION_GREATER "3")
set(BASH_PYTHON2 "#!/usr/bin/env python")
set(BASH_PYTHON3 "#!/usr/bin/env python3")
if(DEFINED TUTTLE_PYTHON_VERSION)
if(${TUTTLE_PYTHON_VERSION} VERSION_GREATER "3")
set(BASH_PYTHON2 "#!/usr/bin/env python")
set(BASH_PYTHON3 "#!/usr/bin/env python3")

file(GLOB_RECURSE PYTHON_APPS sam/*.py script/*.py)
foreach(PYTHON_APP ${PYTHON_APPS})
file(READ "${PYTHON_APP}" APP_CONTENT_PYTHON2)
string(REGEX REPLACE ${BASH_PYTHON2} ${BASH_PYTHON3} APP_CONTENT_PYTHON3 "${APP_CONTENT_PYTHON2}" )
file(WRITE "${PYTHON_APP}" "${APP_CONTENT_PYTHON3}")
endforeach()
file(GLOB_RECURSE PYTHON_APPS sam/*.py script/*.py)
foreach(PYTHON_APP ${PYTHON_APPS})
file(READ "${PYTHON_APP}" APP_CONTENT_PYTHON2)
string(REGEX REPLACE ${BASH_PYTHON2} ${BASH_PYTHON3} APP_CONTENT_PYTHON3 "${APP_CONTENT_PYTHON2}" )
file(WRITE "${PYTHON_APP}" "${APP_CONTENT_PYTHON3}")
endforeach()
endif()
endif()
11 changes: 5 additions & 6 deletions tools/travis/launch_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,18 @@ 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
if [[ ${PYTHON_VERSION} == "2.7" ]]; then
nosetests ${TRAVIS_BUILD_DIR}/libraries/tuttle/pyTest -v
elif [[ ${PYTHON_VERSION} == "3.2" ]]; then
nosetests3 ${TRAVIS_BUILD_DIR}/libraries/tuttle/pyTest -v
export NOSETESTS_BIN=nosetests
if [[ ${PYTHON_VERSION} == 3.* ]]; then
export NOSETESTS_BIN=nosetests3
fi

${NOSETESTS_BIN} ${TRAVIS_BUILD_DIR}/libraries/tuttle/pyTest -v

# boost unit tests
ln -s ${TRAVIS_BUILD_DIR}/TuttleOFX-data ${TRAVIS_BUILD_DIR}/testBin/TuttleOFX-data
cd ${TUTTLEOFX_BUILD}
make run_tests

# sam tests
if [[ ${PYTHON_VERSION} == "2.7" ]]; then
if [[ ${PYTHON_VERSION} == 2.* ]]; then
${TRAVIS_BUILD_DIR}/applications/test/samCommands.sh
fi