Skip to content

Commit

Permalink
Travis: migrating from legacy to container-based infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
Clement Champetier committed Jul 20, 2015
1 parent 34e550c commit c3a588a
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 43 deletions.
53 changes: 52 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ env:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "NvoMZI1lDLmdoKMgAJnNp3RzdRMYGfWL4buwPdIRyjJ522AIceVrT59x0//JB2bdbrABibo/o5TPP1dUGBJlVp9N250R0pjKz8zlehTL++6Y5z0zGWF9WRXOzrvTOCDpUAjJ24zwIREFy02qHmhcEbAy5+IE8aw9s3eZxsngL54="

- DEPENDENCIES_INSTALL=${TRAVIS_BUILD_DIR}/install-dependencies
- TUTTLE_BUILD=${TRAVIS_BUILD_DIR}/build-tuttle
- TUTTLE_INSTALL=${TRAVIS_BUILD_DIR}/install-tuttle
- CI_NODE_TOTAL=2
Expand All @@ -17,6 +19,9 @@ compiler:
- gcc
- clang

# Use container-based infrastructure
sudo: false

matrix:
exclude:
- os: osx
Expand All @@ -26,9 +31,12 @@ matrix:
fast_finish: true

cache:
# Caching Ubuntu packages
apt: true
# Caching other directories
directories:
- /usr/local/Cellar
- ${DEPENDENCIES_INSTALL}
- ${TRAVIS_BUILD_DIR}/TuttleOFX-data

before_install:
- env | sort
Expand Down Expand Up @@ -58,6 +66,49 @@ after_failure:
- cat ${TUTTLE_BUILD}/CMakeFiles/CMakeOutput.log

addons:
apt:
sources: ['boost-latest', 'kalakris-cmake', 'kubuntu-backports']
packages:
- cmake
- swig
- libboost1.55-all-dev
- python-dev
- python-numpy
- libfreetype6-dev
- libbz2-dev
- libltdl-dev
- libpng-dev
- libjpeg-dev
- libglew-dev
- libtiff4-dev
- libilmbase-dev
- libopenexr-dev
- libglew-dev
- libgraphviz-dev
- graphviz-dev
- python-nose
- python-imaging
- libturbojpeg
- libxmu-dev
- libmp3lame-dev
- liblzma-dev
- libxt-dev
- libmagickcore-dev
- liblcms2-dev
- libyaml-dev

# Currently, these following packages are not available.
# Checkout this list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
- libopenctl0.8
- libcaca-dev
- libraw-dev
- libopenjpeg-dev
- libglui-dev
- libtinyxml-dev
- libopenimageio-dev
- yasm
- libx264-dev
- libxvidcore-dev
coverity_scan:
project:
name: "tuttleofx/TuttleOFX"
Expand Down
10 changes: 8 additions & 2 deletions tools/travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ set -x
mkdir -p ${TUTTLE_BUILD}
cd ${TUTTLE_BUILD}

# Ask cmake to search in all homebrew packages
CMAKE_PREFIX_PATH=$(echo /usr/local/Cellar/*/* | sed 's/ /;/g')
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
# Ask cmake to search in all dependencies we've installed manually
export CMAKE_PREFIX_PATH=$DEPENDENCIES_INSTALL
elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
# Ask cmake to search in all homebrew packages
export CMAKE_PREFIX_PATH=$(echo /usr/local/Cellar/*/* | sed 's/ /;/g')
fi

# Build tuttle
cmake --version
cmake -DTUTTLE_EXPERIMENTAL=True -DCMAKE_INSTALL_PREFIX=${TUTTLE_INSTALL} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH ..
make -j${CI_NODE_TOTAL} -k
make install
Expand Down
75 changes: 37 additions & 38 deletions tools/travis/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,47 @@ set -x

if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then

sudo add-apt-repository -y ppa:boost-latest/ppa
sudo add-apt-repository -y ppa:irie/openimageio
sudo add-apt-repository -y ppa:kubuntu-ppa/backports
sudo apt-get update -qq
if [ ! -d "${DEPENDENCIES_INSTALL}/lib/" ]; then

sudo apt-get install -qq cmake swig swig2.0 libboost1.55-all-dev python-dev python-numpy libfreetype6-dev libXt-dev libbz2-dev liblcms-dev libopenctl0.8 libltdl-dev libpng-dev libcaca-dev libjpeg-dev libglew-dev libtiff-dev libilmbase-dev libopenexr-dev libMagickCore-dev libraw-dev libopenjpeg-dev libglui-dev libglew-dev graphviz graphviz-dev python-nose python-imaging libtinyxml-dev libyaml-cpp-dev libopenimageio-dev libturbojpeg libxmu-dev yasm libmp3lame-dev libx264-dev libxvidcore-dev liblzma-dev
cd $TRAVIS_BUILD_DIR
wget https://www.ffmpeg.org/releases/ffmpeg-2.2.9.tar.bz2
bunzip2 ffmpeg-2.2.9.tar.bz2
tar -xf ffmpeg-2.2.9.tar
cd ffmpeg-2.2.9
./configure --prefix=${DEPENDENCIES_INSTALL} --enable-shared --disable-static --disable-yasm && make -j${CI_NODE_TOTAL} && make install

cd $TRAVIS_BUILD_DIR
wget https://www.ffmpeg.org/releases/ffmpeg-2.2.9.tar.bz2
bunzip2 ffmpeg-2.2.9.tar.bz2
tar -xf ffmpeg-2.2.9.tar
cd ffmpeg-2.2.9
./configure --enable-shared --disable-static && make -j${CI_NODE_TOTAL} && sudo make install
cd $TRAVIS_BUILD_DIR
wget https://github.com/ampas/aces_container/archive/v1.0.tar.gz -O /tmp/aces_container-1.0.tar.gz
tar -xzf /tmp/aces_container-1.0.tar.gz
mkdir aces_container-1.0/build
cd aces_container-1.0/build
cmake .. -DCMAKE_INSTALL_PREFIX=${DEPENDENCIES_INSTALL} && make -j${CI_NODE_TOTAL} && make install

cd $TRAVIS_BUILD_DIR
wget https://github.com/ampas/aces_container/archive/v1.0.tar.gz -O /tmp/aces_container-1.0.tar.gz
tar -xzf /tmp/aces_container-1.0.tar.gz
mkdir aces_container-1.0/build
cd aces_container-1.0/build
cmake .. && make -j${CI_NODE_TOTAL} && sudo make install
cd $TRAVIS_BUILD_DIR
wget https://github.com/ampas/CTL/archive/ctl-1.5.2.tar.gz -O /tmp/ctl-1.5.2.tar.gz
tar -xzf /tmp/ctl-1.5.2.tar.gz
mkdir CTL-ctl-1.5.2/build
cd CTL-ctl-1.5.2/build
cmake .. -DCMAKE_INSTALL_PREFIX=${DEPENDENCIES_INSTALL} && make -j${CI_NODE_TOTAL} && make install

cd $TRAVIS_BUILD_DIR
wget https://github.com/ampas/CTL/archive/ctl-1.5.2.tar.gz -O /tmp/ctl-1.5.2.tar.gz
tar -xzf /tmp/ctl-1.5.2.tar.gz
mkdir CTL-ctl-1.5.2/build
cd CTL-ctl-1.5.2/build
cmake .. && make -j${CI_NODE_TOTAL} && sudo make install
cd $TRAVIS_BUILD_DIR
wget https://github.com/wdas/SeExpr/archive/rel-1.0.1.tar.gz -O /tmp/SeExpr-1.0.1.tar.gz
tar -xzf /tmp/SeExpr-1.0.1.tar.gz
mkdir SeExpr-rel-1.0.1/build
cd SeExpr-rel-1.0.1/build
cmake .. -DCMAKE_INSTALL_PREFIX=${DEPENDENCIES_INSTALL} && make -j${CI_NODE_TOTAL} && make install

cd $TRAVIS_BUILD_DIR
wget https://github.com/wdas/SeExpr/archive/rel-1.0.1.tar.gz -O /tmp/SeExpr-1.0.1.tar.gz
tar -xzf /tmp/SeExpr-1.0.1.tar.gz
mkdir SeExpr-rel-1.0.1/build
cd SeExpr-rel-1.0.1/build
cmake .. && make -j${CI_NODE_TOTAL} && sudo make install
cd $TRAVIS_BUILD_DIR
wget https://github.com/imageworks/OpenColorIO/archive/v1.0.9.tar.gz -O /tmp/ocio-1.0.9.tar.gz
tar -xzf /tmp/ocio-1.0.9.tar.gz
mkdir OpenColorIO-1.0.9/build
cd OpenColorIO-1.0.9/build
cmake .. -DCMAKE_INSTALL_PREFIX=${DEPENDENCIES_INSTALL} && make -j${CI_NODE_TOTAL} && make install

else
echo 'Using cached directory.';
fi

cd $TRAVIS_BUILD_DIR
wget https://github.com/imageworks/OpenColorIO/archive/v1.0.9.tar.gz -O /tmp/ocio-1.0.9.tar.gz
tar -xzf /tmp/ocio-1.0.9.tar.gz
mkdir OpenColorIO-1.0.9/build
cd OpenColorIO-1.0.9/build
cmake .. && make -j${CI_NODE_TOTAL} && sudo make install

elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then

Expand All @@ -57,10 +57,9 @@ elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then

echo "Install TuttleOFX dependencies"
brew install python
echo " - pip install nose for test"
echo "Pip install nose for test"
pip install nose
echo " - install brew packages"
echo "Install brew packages"
brew install swig ilmbase openexr jasper little-cms2 glew freetype fontconfig ffmpeg imagemagick libcaca aces_container ctl jpeg-turbo libraw seexpr openjpeg opencolorio openimageio numpy

echo "End dependencies installation."
fi
8 changes: 6 additions & 2 deletions tools/travis/launch_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

# set env
export OFX_PLUGIN_PATH=${TUTTLE_INSTALL}/OFX
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${TUTTLE_INSTALL}/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${DEPENDENCIES_INSTALL}/lib:${TUTTLE_INSTALL}/lib
export PYTHONPATH=${TUTTLE_INSTALL}/lib/python2.7/site-packages:$PYTHONPATH

# clone data for tests
git clone https://github.com/tuttleofx/TuttleOFX-data.git
if [ ! -d "${TRAVIS_BUILD_DIR}/TuttleOFX-data" ]; then
git clone https://github.com/tuttleofx/TuttleOFX-data.git
else
echo 'Using cached directory.';
fi

# nosetests
ln -s ${TRAVIS_BUILD_DIR}/TuttleOFX-data ${TRAVIS_BUILD_DIR}/libraries/tuttle/pyTest/TuttleOFX-data
Expand Down

0 comments on commit c3a588a

Please sign in to comment.