-
Notifications
You must be signed in to change notification settings - Fork 17
/
.travis.yml
172 lines (163 loc) · 7.29 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "az4QH6KOKwa7UCQBEslcDQkm2yedGAoaGpJQ5UjO3I+W467GpuJm9iPEbKZAwz+Geo/QfLOWVA5w3wfwl8LTrOlI+vKTwbgjV2PkqTaHWzFF31v0p7NUoLDPpidHbs7sX/09q0XbBjdlvgCjs4+mbeGm5hPjk6bIcWX2MD8Wi4g="
# Coverity run condition (avoid matrix multiple runs), need customized
# build script. Need an update if new matrix cases.
- coverity_scan_run_condition='"$CC" = gcc -a "$TRAVIS_OS_NAME" != osx'
# Coverity script test mode (if true no uploading, avoid reaching the quota)
# usual processing: false.
- coverity_scan_script_test_mode=false
# Travis CI has 1.5 cores per VM, take advantage of it
- MAKEFLAGSPARALLEL="-j 2"
language: cpp
matrix:
include:
- os: linux
dist: trusty
sudo: required
compiler: gcc
- os: linux
dist: trusty
sudo: required
compiler: clang
exclude:
- os: osx
compiler: gcc
fast_finish: true
# requires boost >= 1.49 to compile in C++11 mode
# see http://stackoverflow.com/questions/11302758/error-while-copy-constructing-boostshared-ptr-using-c11
# we use the irie/boost ppa for that purpose
# we get libyaml-cpp-dev from kubuntu backports
before_install:
- date -u
- uname -a
- export J='-j3'
- git submodule update --init --recursive
# - sudo add-apt-repository -y ppa:boost-latest/ppa # precise only
- sudo add-apt-repository -y ppa:samuel-bachmann/boost
- sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
# - sudo add-apt-repository -y ppa:archivematica/externals
# - sudo add-apt-repository -y ppa:jon-severinsson/ffmpeg
# - sudo add-apt-repository -y ppa:spvkgn/ffmpeg-dev
- sudo add-apt-repository -y ppa:jonathonf/ffmpeg-3
# - sudo add-apt-repository -y ppa:irie/boost
- sudo add-apt-repository -y ppa:kubuntu-ppa/backports
- sudo apt-get update -qq
# - sudo apt-get upgrade
- sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libavutil-dev libswresample-dev
install:
# OpenColorIO
# As of 20160917, there is no 1.0.10 release, and OCIO 1.0.9 doesn't build against yaml 0.5.1,
# and doesn't build universal with the included yaml-cpp 0.3,
# so we have to fetch a version from the github.
- sudo apt-get install cmake libtinyxml-dev liblcms2-dev libyaml-cpp-dev libboost1.60-dev
# - wget https://github.com/imageworks/OpenColorIO/archive/v1.0.9.tar.gz -O /tmp/ocio-1.0.9.tar.gz
# - tar zxf /tmp/ocio-1.0.9.tar.gz > /dev/null 2>&1
# - cd OpenColorIO-1.0.9
- git clone https://github.com/imageworks/OpenColorIO.git && cd OpenColorIO
- mkdir _build
- cd _build
- cmake .. -DCMAKE_INSTALL_PREFIX=/opt/ocio -DCMAKE_BUILD_TYPE=Release -DOCIO_BUILD_JNIGLUE=OFF -DOCIO_BUILD_NUKE=OFF -DOCIO_BUILD_SHARED=ON -DOCIO_BUILD_STATIC=OFF -DOCIO_STATIC_JNIGLUE=OFF -DOCIO_BUILD_TRUELIGHT=OFF -DUSE_EXTERNAL_LCMS=ON -DUSE_EXTERNAL_TINYXML=ON -DUSE_EXTERNAL_YAML=ON -DOCIO_BUILD_APPS=OFF -DOCIO_USE_BOOST_PTR=ON -DOCIO_BUILD_TESTS=OFF -DOCIO_BUILD_PYGLUE=OFF
- make $MAKEFLAGSPARALLEL && sudo make install
- cd ../..
# OpenEXR
- sudo apt-get install libopenexr-dev libilmbase-dev
# OpenImageIO (for some reason, freetype is not recognized)
- sudo apt-get install libopenjp2-7-dev libtiff4-dev libjpeg-dev libpng-dev libraw-dev libboost-filesystem1.60-dev libboost-regex1.60-dev libboost-thread1.60-dev libboost-system1.60-dev libwebp-dev libfreetype6-dev libssl-dev
- wget https://github.com/OpenImageIO/oiio/archive/Release-1.7.17.tar.gz -O /tmp/OpenImageIO-1.7.17.tar.gz
- tar zxf /tmp/OpenImageIO-1.7.17.tar.gz > /dev/null 2>&1
- cd oiio-Release-1.7.17
- make $MAKEFLAGSPARALLEL USE_QT=0 USE_PYTHON=0 USE_PYTHON3=0 USE_FIELD3D=0 USE_FFMPEG=0 USE_OPENJPEG=1 USE_OCIO=1 USE_OPENCV=0 USE_OPENSSL=0 USE_FREETYPE=1 USE_GIF=0 USE_PTEX=0 USE_LIBRAW=1 OIIO_BUILD_TESTS=0 OIIO_BUILD_TOOLS=0 OCIO_HOME=/opt/ocio INSTALLDIR=/opt/oiio dist_dir=. cmake
- sudo make $MAKEFLAGSPARALLEL dist_dir=.
- cd ..
# FFmpeg
- sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libavutil-dev
# SeExpr
- wget https://github.com/wdas/SeExpr/archive/v2.11.tar.gz -O /tmp/SeExpr-2.11.tar.gz
- tar zxf /tmp/SeExpr-2.11.tar.gz > /dev/null 2>&1
- cd SeExpr-2.11
- sed -i -e '/SeExprEditor/d' -e '/demos/d' -e '/tests/d' ./CMakeLists.txt
- mkdir _build
- cd _build
- cmake .. -DCMAKE_INSTALL_PREFIX=/opt/seexpr
- make $MAKEFLAGSPARALLEL && sudo make install
- cd ../..
script:
- if [[ ${COVERITY_SCAN_BRANCH} == 1 ]];
then
echo "Don't build on coverty_scan branch.";
exit 0;
fi
#- pkg-config --cflags libraw_r
#- dpkg-query -L libraw-dev
- env PKG_CONFIG_PATH=/opt/ocio/lib/pkgconfig make $J V=1 CONFIG=debug SEEXPR_HOME=/opt/seexpr OIIO_HOME=/opt/oiio
- env PKG_CONFIG_PATH=/opt/ocio/lib/pkgconfig make $J V=1 CONFIG=debug SEEXPR_HOME=/opt/seexpr OIIO_HOME=/opt/oiio nomulti
- make clean
# without OCIO OpenGL support
- env PKG_CONFIG_PATH=/opt/ocio/lib/pkgconfig make $J V=1 CONFIG=debug SEEXPR_HOME=/opt/seexpr OIIO_HOME=/opt/oiio OCIO_OPENGL_CXXFLAGS= OCIO_OPENGL_LINKFLAGS=
- make clean
# without OCIO
- env PKG_CONFIG_PATH=/opt/ocio/lib/pkgconfig make $J V=1 CONFIG=debug SEEXPR_HOME=/opt/seexpr OIIO_HOME=/opt/oiio OCIO_CXXFLAGS= OCIO_LINKFLAGS=
addons:
apt:
sources:
# - boost-latest # precise only
# kubuntu-ppa/backports contains OpenCV
- kubuntu-backports
# the PPA xorg-edgers contains cairo 1.12 (required for rotoscoping)
- ppa:xorg-edgers/ppa
# ubuntu-toolchain-r/test contains recent versions of gcc
- ubuntu-toolchain-r-test
# get a recent ffmpeg (>=2.5) for precise from ppa:archivematica/externals(2.5.1) or ppa:pavlyshko/precise(2.6.1) or ppa:spvkgn/ffmpeg-dev(2.8.6)
# NOT WHITELISTED
#- sourceline: 'ppa:spvkgn/ffmpeg-dev'
# this one is for trusty ffmpeg
- sourceline: 'ppa:jonathonf/ffmpeg-3'
# - kalakris-cmake
packages:
#- gcc-4.9
#- g++-4.9
- gcc-5
- g++-5
#- libavcodec-dev
#- libavformat-dev
#- libswscale-dev
#- libavutil-dev
#- libswresample-dev
- libtinyxml-dev
- liblcms2-dev
- libyaml-cpp-dev
#- libboost-dev
- libopenexr-dev
- libilmbase-dev
- libopenjpeg-dev
- libtiff4-dev
- libjpeg-dev
- libpng-dev
- libraw-dev
#- libboost-filesystem-dev
#- libboost-regex-dev
#- libboost-thread-dev
#- libboost-system-dev
- libwebp-dev
- libfreetype6-dev
- libssl-dev
coverity_scan:
# customized build script URL
# TRAVIS_REPO_SLUG: owner_name/repo_name of repository currently being built
# TRAVIS_BRANCH: name of the branch currently being built
build_script_url: https://raw.githubusercontent.com/$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/.travis-coverity-scan-build.sh
# project metadata
project:
name: $TRAVIS_REPO_SLUG
# Where email notification of build analysis results will be sent
notification_email: [email protected]
# Commands to prepare for build_command
#build_command_prepend: ./configure
# This command will be added as an argument to "cov-build" to compile
# the project for analysis
build_command: "env PKG_CONFIG_PATH=/opt/ocio/lib/pkgconfig make $J CONFIG=debug SEEXPR_HOME=/opt/seexpr OIIO_HOME=/opt/oiio"
# Pattern to match selecting branches that will run analysis
branch_pattern: coverity_scan