forked from AcademySoftwareFoundation/OpenImageIO
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
280 lines (264 loc) · 10.5 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
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# .travis.yml for OIIO
language: cpp
osx_image: xcode10
dist: trusty
# Add-ons: specify apt packages for Linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'ppa:jonathonf/ffmpeg-3'
packages:
- g++-6
- g++-7
- g++-8
- libboost-filesystem1.55
- libboost-regex1.55
- libboost-system1.55
- libboost-thread1.55
- libgif-dev
- libopenjpeg-dev
- libwebp-dev
- libfreetype6-dev
- libjpeg-turbo8-dev
- dcmtk
- libavcodec-dev
- libavformat-dev
- libswscale-dev
- libavutil-dev
- locales
- python-numpy
- libraw-dev
# - qtbase5-dev # FIXME: enable Qt5 on Linux
# - bzip2
# - libtinyxml-dev
# - liblcms2-dev
# - libyaml-cpp-dev
cache:
ccache: true
apt: true
directories:
- $HOME/.ccache
- $PWD/oiio-images
- $PWD/libtiffpic
before_install:
- if [ "$WHICHGCC" == "" ]; then export WHICHGCC="4.8" ; fi
- if [ "$PYTHON_VERSION" == "" ]; then export PYTHON_VERSION="2.7" ; fi
- if [ "$BUILD_MISSING_DEPS" == "" ] ; then export BUILD_MISSING_DEPS=1 ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then
uname -n ;
export PLATFORM=macosx ;
sysctl machdep.cpu.features ;
elif [ $TRAVIS_OS_NAME == linux ] ; then
uname -n ;
export PLATFORM=linux64 ;
head -40 /proc/cpuinfo ;
fi
- if [ "$DEBUG" == 1 ] ; then export PLATFORM=${PLATFORM}.debug ; fi
- echo "Build platform name is $PLATFORM"
install:
- if [ "$CXX" == "g++" ]; then export CXX="g++-${WHICHGCC}" ; fi
- export USE_CCACHE=1
- export CCACHE_CPP2=1
- if [ $TRAVIS_OS_NAME == osx ] ; then
src/build-scripts/install_homebrew_deps.bash ;
export PATH=/usr/local/opt/qt5/bin:$PATH ;
export PATH=/usr/local/opt/python/libexec/bin:$PATH ;
export PYTHONPATH=/usr/local/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH ;
if [ "${CLANG_TIDY}" != "" ] ; then
export PATH=/usr/local/Cellar/llvm/7.0.0_1/bin:$PATH ;
echo $PATH ;
fi ;
elif [ $TRAVIS_OS_NAME == linux ] ; then
CXX="ccache $CXX" CCACHE_CPP2=1 src/build-scripts/build_openexr.bash ;
export ILMBASE_ROOT_DIR=$PWD/ext/openexr-install ;
export OPENEXR_ROOT_DIR=$PWD/ext/openexr-install ;
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OPENEXR_ROOT_DIR/lib ;
CXX="ccache $CXX" CCACHE_CPP2=1 src/build-scripts/build_ocio.bash ;
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/ext/OpenColorIO/dist/lib ;
if [ "${CLANG_TIDY}" != "" ] ; then
export LLVM_VERSION=7.0.0 ;
export LLVMTAR=clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-14.04.tar.xz ;
time wget http://releases.llvm.org/${LLVM_VERSION}/${LLVMTAR} ;
tar xf $LLVMTAR ;
rm -f $LLVMTAR ;
mv clang+llvm* llvm-install ;
export LLVM_DIRECTORY=$PWD/llvm-install ;
export PATH=$LLVM_DIRECTORY/bin:$PATH ;
fi
fi
- src/build-scripts/install_test_images.bash
# before_script:
script:
- make VERBOSE=1 $BUILD_FLAGS BUILD_MISSING_DEPS=1 cmakesetup
- make -j2 $BUILD_FLAGS $OIIOTARGET
- export OPENIMAGEIO_ROOT_DIR=$PWD/dist/$PLATFORM
- export DYLD_LIBRARY_PATH=$OPENIMAGEIO_ROOT_DIR/lib:$DYLD_LIBRARY_PATH
- export LD_LIBRARY_PATH=$OPENIMAGEIO_ROOT_DIR/lib:$LD_LIBRARY_PATH
- export OIIO_LIBRARY_PATH=$OPENIMAGEIO_ROOT_DIR/lib
- export PYTHONPATH=$OPENIMAGEIO_ROOT_DIR/python:$PYTHONPATH
- export LSAN_OPTIONS=suppressions=$PWD/src/build-scripts/nosanitize.txt
- if [ "$SKIP_TESTS" == "" ] ; then
$OPENIMAGEIO_ROOT_DIR/bin/oiiotool --help ;
make $BUILD_FLAGS test ;
fi
- git diff --color ;
THEDIFF=`git diff` ;
if [ "$THEDIFF" != "" ] ; then
echo "git diff was not empty. Failing clang-format or clang-tidy check." ;
exit 1 ;
fi
after_success:
- if [ "$CODECOV" == 1 ] ; then bash <(curl -s https://codecov.io/bash) ; fi
after_failure:
branches:
only:
- master
- /RB-/
- /lg-/
matrix:
fast_finish: true
exclude:
- os: osx
compiler: gcc
- os: linux
compiler: clang
include:
# test default compile: C++11, optimized, default compilers, SSE2
- name: "VFX Platform 2017 (gcc48, py27, exr2.2)"
os: linux
compiler: gcc
env: EXRBRANCH=v2.2.0
- name: "Mac (latest clang, py37)"
os: osx
compiler: clang
env: PYTHON_VERSION=3.7
# Make sure Python 2.7 still works on OSX, but only for PRs, master/RB
# pushes, or if the branch name includes "python".
- name: "Mac py27 (latest clang)"
os: osx
compiler: clang
env: PYTHON_VERSION=2.7
if: branch =~ /(master|RB|travis|python)/ OR type = pull_request
# test debug build with default compiler
- name: "Linux DEBUG"
os: linux
compiler: gcc
env: DEBUG=1
# - os: osx
# compiler: clang
# env: DEBUG=1
# test with C++14, gcc 6, SSE 4.2
- name: "VFX Platform 2018 (gcc6, cpp14, exr2.2), sse4.2"
os: linux
compiler: gcc
env: WHICHGCC=6 USE_CPP=14 USE_SIMD=sse4.2 EXRBRANCH=v2.2.0
# test with C++14, gcc 7, latest SIMD flags supported by TravisCI VMs
- name: "gcc7, cpp14, avx, exr2.3"
os: linux
compiler: gcc
env: WHICHGCC=7 USE_CPP=14 USE_SIMD=avx,f16c
# Test LINKSTATIC on both platforms. This is incomplete and to make it
# work we still need to disable a bunch of specific plugins.
# FIXME: Don't have LINKSTATIC working on Travis for Linux, it's
# complaining about PIC issues.
# - os: linux
# compiler: gcc
# env: LINKSTATIC=1 USE_FFMPEG=0 USE_OCIO=0 USE_OPENCV=0 MY_CMAKE_FLAGS="-DUSE_fPIC=1"
##### TEMPORARILY DISABLED -- Travis upgraded some packages and this
## is having link errors. Look into fixing this later.
## - os: osx
## osx_image: xcode8.3
## compiler: clang
## env: LINKSTATIC=1 USE_FFMPEG=0 USE_OCIO=0 USE_OPENCV=0
# Dynamic analysis: build with sanitizers and run most tests.
# Because this test takes so long to run, only build for PRs, direct
# pushes to master or RB branches, or if the branch name includes
# "sanitize". Other ordinary work branch pushes don't need to run this
# every time.
- name: "Sanitizers"
os: linux
compiler: gcc
env: WHICHGCC=6 SANITIZE=address USE_PYTHON=0
if: branch =~ /(master|RB|travis|san)/ OR type = pull_request
# One more, just for the heck of it, turn all SIMD off, and also make
# sure we're falling back on libjpeg, not jpeg-turbo, and don't embed
# the plugins (to make sure that doesn't rust away). I guess this
# should/could be both platforms, but in the interest of making the
# tests go faster, don't bother doing it on OSX.
# Only build this case for PRs, direct pushes to master or RB branches,
# or if the branch name includes "simd". Other ordinary work branch
# pushes don't need to run this.
- name: "Oldest everything: no simd, no jpegturbo, dso plugins, exr2.2"
os: linux
compiler: gcc
env: USE_SIMD=0 USE_JPEGTURBO=0 EMBEDPLUGINS=0 EXRBRANCH=v2.2.0
if: branch =~ /(master|RB|travis|simd)/ OR type = pull_request
# test with C++14, gcc 8, latest SIMD flags supported by TravisCI VMs
# Since VFXPlatform doesn't bless gcc8 yet, only build this
# case for PRs, direct pushes to master or RB branches, or if the branch
# name includes "gcc". Other ordinary work branch pushes don't
# need to run this.
- name: "Linux gcc8 cpp14 avx"
os: linux
compiler: gcc
env: WHICHGCC=8 USE_CPP=14 USE_SIMD=avx,f16c
if: branch =~ /(master|RB|travis|gcc)/ OR type = pull_request
# test with C++17, gcc 8, latest SIMD flags supported by TravisCI VMs.
# Since VFXPlatform doesn't bless C++17 or gcc8 yet, only build this
# case for PRs, direct pushes to master or RB branches, or if the branch
# name includes "17" or "gcc". Other ordinary work branch pushes don't
# need to run this.
- name: "Linux most advanced (gcc8, cpp17, avx/f16c)"
os: linux
compiler: gcc
env: WHICHGCC=8 USE_CPP=17 USE_SIMD=avx,f16c
if: branch =~ /(master|RB|travis|gcc|17)/ OR type = pull_request
# build for AVX2, don't run the tests (ensure against build breaks)
# Only build this case for PRs, direct pushes to master or RB branches,
# or if the branch name includes "simd". Other ordinary work branch
# pushes don't need to run this.
- name: "Build clean AVX2 (no tests)"
os: linux
compiler: gcc
env: WHICHGCC=6 USE_SIMD=avx2 SKIP_TESTS=1
if: branch =~ /(master|RB|travis|simd)/ OR type = pull_request
# build for AVX512, don't run the tests (ensure against build breaks)
# Only build this case for PRs, direct pushes to master or RB branches,
# or if the branch name includes "simd". Other ordinary work branch
# pushes don't need to run this.
- name: "Build clean AVX512 (no tests)"
os: linux
compiler: gcc
env: WHICHGCC=7 USE_SIMD=avx2,avx512f,f16c SKIP_TESTS=1
if: branch =~ /(master|RB|travis|simd)/ OR type = pull_request
# Just run clang-format, this test only checks formatting rule conformance
- name: "clang-format format verification"
os: osx
compiler: clang
env: OIIOTARGET=clang-format SKIP_TESTS=1 BUILD_MISSING_DEPS=0
#if: branch =~ /(master|RB|travis|simd)/ OR type = pull_request
# Static analysis: build with clang-tidy.
# Disabled -- this takes so long to run, it can't complete in Travis's
# 50 minute time limit. Left here just to show how it should work.
# - name: "Static analysis / clang-tidy"
# os: linux
# compiler: gcc
# env: CLANG_TIDY=1 CLANG_TIDY_FIX=1 SKIP_TESTS=1
# if: branch =~ /(master|RB|travis|tidy)/ OR type = pull_request
# Build with EMBEDPLUGINS=0, both platforms.
# FIXME: doesn't work yet on Travis
# - os: linux
# compiler: gcc
# env: EMBEDPLUGINS=0
# FIXME: don't have OSX EMBEDPLUGINS=0 working yet on Travis (though
# it works fine on my laptop).
# - os: osx
# compiler: clang
# env: EMBEDPLUGINS=0
notifications:
email:
recipients:
on_success: change
on_failure: always