-
Notifications
You must be signed in to change notification settings - Fork 21
/
.travis.yml.disabled
230 lines (221 loc) · 10.1 KB
/
.travis.yml.disabled
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
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: "NgEwy72/AUwS5fc2MhuEakGq2c76rjyJRM8k6wLFLUFAcniwLI/Unl52TKA0dt+gX3ypBfJtOB5OZop3pOgGNf/aYrVQOlZTe7S/agyN9KQgLPRTfpwcxtaibF4/6mA9sG5vbQc/IkqQYMczcZUM8L5wXvL7vqIfwHhi8nASWB1rv8DaID42EL/V6adO7iq/ln9MHAjOMRdPwb9/UR20v/nC1G+iMIiXQA6YjvgiJN2FbqDHDwAYnfc2Ln0N5HGgFB38ducaPHKi/66Siayd4tJ9uCQ/mM16+zT0ZlSNFwfxcnXv0bAlh39S2C+vysLmsRmaZneYHgTboWWbCEJxpJ1HM1nwNYKkDt/IMV5CFjqW/f7icZWOvtaYmxaH/NDHG9ZTKZ60+gvyCFO87E0rwj+Wlm3kHMeoENj8dYyjlmVAtPPK4CJ6YjnI+Wr1BaR3TYM5mkkrhhnhqZYZ0ZuX+i04jJPTpwZpEEY7m7y0LMno2IOdMqpSyCJurP6HWqL63oEVQzwrTiDy+hxZP4SAV+tahypxyhf9YypKnpe8ug3LyTW+NSZlPsCj/qzeCGsp/Pb4Gyr1P15jyD4SKxuD4HFpqicSeTtzD84znv8mZ/Lf5/typGkfuSFPkAUSUfcu2PmGOhAh5sdfoWaA9y4Lmnogc5ddVz6Qcx4LYCi0+1Y="
# 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: bionic
sudo: required
compiler: gcc
- os: linux
dist: bionic
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'
- if [ ${TRAVIS_OS_NAME} = "linux" ]; then
echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca- ;
fi
- git submodule update --init --recursive
# - 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-4
# - 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 -y --allow-unauthenticated libavcodec-dev libavformat-dev libswscale-dev libavutil-dev libswresample-dev
- if [ ${TRAVIS_OS_NAME} = "linux" -a "$CC" = "gcc" ];
then
if [ "$BUILDDOC" = 1 ]; then
sudo apt-get install doxygen xsltproc;
fi;
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
sudo apt-get update;
sudo apt-get install gcc-8 g++-8;
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 90;
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90;
fi
install:
- if [[ ${COVERITY_BUILD_DISABLED} == 1 ]];
then
exit 0;
fi
# OpenColorIO
- sudo apt-get install cmake libtinyxml-dev liblcms2-dev libyaml-cpp-dev libboost-dev
- if [ ! -d "$HOME/ocio/lib" ]; then
wget https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v1.1.1.tar.gz -O /tmp/ocio.tgz;
tar -xvzf /tmp/ocio.tgz -C $HOME;
pushd $HOME/OpenColorIO-1.1.1;
find . -name CMakeLists.txt -exec sed -e s/-Werror// -i {} \; ;
mkdir _build && cd _build;
cmake -DCMAKE_INSTALL_PREFIX=$HOME/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 && make install;
popd;
else
echo 'Using cached OpenColorIO';
fi
# OpenEXR (2.0 is required for OIIO 1.8)
# see https://github.com/PixarAnimationStudios/USD/blob/master/.travis.yml
- if [ ! -d "$HOME/openexr/lib" ]; then
wget https://github.com/openexr/openexr/releases/download/v2.3.0/ilmbase-2.3.0.tar.gz -O /tmp/ilmbase.tgz;
tar -xvzf /tmp/ilmbase.tgz -C $HOME;
pushd $HOME/ilmbase-2.3.0;
./configure --prefix=$HOME/openexr;
make && make install;
popd;
wget https://github.com/openexr/openexr/releases/download/v2.3.0/openexr-2.3.0.tar.gz -O /tmp/openexr.tgz;
tar -xvzf /tmp/openexr.tgz -C $HOME;
pushd $HOME/openexr-2.3.0;
./configure --prefix=$HOME/openexr --with-pkg-config=no LDFLAGS="-Wl,-rpath -Wl,$HOME/openexr/lib";
make $MAKEFLAGSPARALLEL && make install;
popd;
else
echo 'Using cached OpenEXR';
fi
# OpenImageIO (for some reason, freetype is not recognized)
# see https://github.com/PixarAnimationStudios/USD/blob/master/.travis.yml
- sudo apt-get install libopenjp2-7-dev libtiff-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
- if [ ! -d "$HOME/oiio/lib" ]; then
wget https://github.com/OpenImageIO/oiio/archive/Release-2.2.15.1.tar.gz -O /tmp/oiio.tgz;
tar -xvzf /tmp/oiio.tgz -C $HOME;
pushd $HOME/oiio-Release-2.2.15.1;
mkdir _build && cd _build;
cmake -DCMAKE_INSTALL_PREFIX=$HOME/oiio -DILMBASE_ROOT_DIR=$HOME/openexr -DOPENEXR_ROOT_DIR=$HOME/openexr -DOCIO_HOME=$HOME/ocio -DUSE_QT=OFF -DUSE_PYTHON=OFF -DUSE_PYTHON3=OFF -DUSE_FIELD3D=OFF -DUSE_FFMPEG=OFF -DUSE_OPENJPEG=ON -DUSE_OCIO=ON -DUSE_OPENCV=OFF -DUSE_OPENSSL=OFF -DUSE_FREETYPE=ON -DUSE_GIF=OFF -DUSE_PTEX=OFF -DUSE_LIBRAW=ON -DOIIO_BUILD_TESTS=OFF -DOIIO_BUILD_TOOLS=OFF -DSTOP_ON_WARNING:BOOL=OFF ..;
make $MAKEFLAGSPARALLEL && make install;
popd;
else
echo 'Using cached OpenImageIO';
fi
# FFmpeg
- sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libavutil-dev
# SeExpr
- if [ ! -d "$HOME/seexpr/lib" ]; then
wget https://github.com/wdas/SeExpr/archive/v2.11.tar.gz -O /tmp/seexpr.tgz;
tar -xvzf /tmp/seexpr.tgz -C $HOME;
pushd $HOME/SeExpr-2.11;
sed -i -e '/SeExprEditor/d' -e '/demos/d' -e '/tests/d' ./CMakeLists.txt;
mkdir _build && cd _build;
cmake -DCMAKE_INSTALL_PREFIX=$HOME/seexpr ..;
make $MAKEFLAGSPARALLEL && make install;
popd;
else
echo 'Using cached SeExpr';
fi
cache:
directories:
- $HOME/openexr
- $HOME/ocio
- $HOME/oiio
- $HOME/seexpr
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=$HOME/ocio/lib/pkgconfig:$HOME/openexr/lib/pkgconfig pkg-config --cflags libraw_r
#- ls $HOME/openexr/lib/pkgconfig
#- ls $HOME/openexr/include/OpenEXR
- env PKG_CONFIG_PATH=$HOME/oiio/lib/pkgconfig:$HOME/ocio/lib/pkgconfig:$HOME/openexr/lib/pkgconfig make $J V=1 CXXFLAGS_EXTRA=-std=c++11 CONFIG=debug SEEXPR_HOME=$HOME/seexpr
- env PKG_CONFIG_PATH=$HOME/oiio/lib/pkgconfig:$HOME/ocio/lib/pkgconfig:$HOME/openexr/lib/pkgconfig make $J V=1 CXXFLAGS_EXTRA=-std=c++11 CONFIG=debug SEEXPR_HOME=$HOME/seexpr nomulti
- make clean
# without OCIO OpenGL support
- env PKG_CONFIG_PATH=$HOME/oiio/lib/pkgconfig:$HOME/ocio/lib/pkgconfig:$HOME/openexr/lib/pkgconfig make $J V=1 CXXFLAGS_EXTRA=-std=c++11 CONFIG=debug SEEXPR_HOME=$HOME/seexpr OCIO_OPENGL_CXXFLAGS= OCIO_OPENGL_LINKFLAGS=
- make clean
# without OCIO
- env PKG_CONFIG_PATH=$HOME/oiio/lib/pkgconfig:$HOME/openexr/lib/pkgconfig make $J V=1 CXXFLAGS_EXTRA=-std=c++11 CONFIG=debug SEEXPR_HOME=$HOME/seexpr 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-4'
# - kalakris-cmake
packages:
- ca-certificates
#- gcc-4.9
#- g++-4.9
#- gcc-5
#- g++-5
#- gcc-6
#- g++-6
#- gcc-7
#- g++-7
- gcc-8
- g++-8
#- libavcodec-dev
#- libavformat-dev
#- libswscale-dev
#- libavutil-dev
#- libswresample-dev
- libtinyxml-dev
- liblcms2-dev
- libyaml-cpp-dev
#- libboost-dev
#- libopenexr-dev
#- libilmbase-dev
- libopenjp2-7-dev
- libtiff-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
- libgl-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=$HOME/oiio/lib/pkgconfig:$HOME/ocio/lib/pkgconfig:$HOME/openexr/lib/pkgconfig make $J CXXFLAGS_EXTRA=-std=c++11 CONFIG=debug SEEXPR_HOME=$HOME/seexpr"
# Pattern to match selecting branches that will run analysis
branch_pattern: coverity_scan