forked from AcademySoftwareFoundation/OpenImageIO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
199 lines (184 loc) · 6.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
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
# .travis.yml for OIIO
language: cpp
sudo: false
osx_image: xcode8.3
dist: trusty
# Add-ons: specify apt packages for Linux
addons:
apt:
sources:
- boost-latest
- ubuntu-toolchain-r-test
- george-edison55-precise-backports
- sourceline: 'ppa:jonathonf/ffmpeg-3'
packages:
- g++-6
- g++-7
- 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 [ $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
# Temporary fix: Use LG's private openexr branch, until the
# fixes are merged into the OpenEXR project that will address
# the warnings for gcc7 and C++17 compatibility.
- export EXRREPO=https://github.com/lgritz/openexr.git ;
- export EXRBRANCH=lg-cpp11 ;
- if [ $TRAVIS_OS_NAME == osx ] ; then
src/build-scripts/install_homebrew_deps.bash ;
export PATH=/usr/local/opt/qt5/bin:$PATH ;
export PYTHON_VERSION=3.6 ;
export PATH=/usr/local/opt/python/libexec/bin:$PATH ;
export PYTHONPATH=/usr/local/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH ;
elif [ $TRAVIS_OS_NAME == linux ] ; then
CXX="ccache $CXX" CCACHE_CPP2=1 src/build-scripts/build_openexr.bash ;
export ILMBASE_HOME=$PWD/openexr-install ;
export OPENEXR_HOME=$PWD/openexr-install ;
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OPENEXR_HOME/lib ;
CXX="ccache $CXX" CCACHE_CPP2=1 src/build-scripts/build_ocio.bash ;
export OCIO_PATH=$PWD/ext/OpenColorIO/dist ;
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OCIO_PATH/lib ;
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
- export OPENIMAGEIOHOME=$PWD/dist/$PLATFORM
- export DYLD_LIBRARY_PATH=$OPENIMAGEIOHOME/lib:$DYLD_LIBRARY_PATH
- export LD_LIBRARY_PATH=$OPENIMAGEIOHOME/lib:$LD_LIBRARY_PATH
- export OIIO_LIBRARY_PATH=$OPENIMAGEIOHOME/lib
- echo "OIIO_LIBRARY_PATH is ${OIIO_LIBRARY_PATH}"
# - echo "list of library path:"
# - ls -R $OIIO_LIBRARY_PATH
- export PYTHONPATH=$OPENIMAGEIOHOME/python:$PYTHONPATH
- export LSAN_OPTIONS=suppressions=$PWD/src/build-scripts/nosanitize.txt
- if [ "$SKIP_TESTS" == "" ] ; then
make $BUILD_FLAGS test ;
fi
after_success:
- if [ "$CODECOV" == 1 ] ; then bash <(curl -s https://codecov.io/bash) ; fi
after_failure:
# FIXME: find failed logs, stash them or send them to lg?
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
- os: linux
compiler: gcc
- os: osx
compiler: clang
# test debug build
- os: linux
compiler: gcc
env: DEBUG=1
# - os: osx
# compiler: clang
# env: DEBUG=1
# test with C++14, gcc 6, SSE 4.2
- os: linux
compiler: gcc
env: WHICHGCC=6 USE_CPP=14 USE_SIMD=sse4.2
# test with C++14, gcc 7, latest SIMD flags supported by TravisCI VMs
- 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
# Build with sanitizers
- os: linux
compiler: gcc
env: WHICHGCC=6 SANITIZE=address USE_PYTHON=0
# 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. 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.
- os: linux
compiler: gcc
env: USE_SIMD=0 USE_JPEGTURBO=0
# build for AVX2, don't run the tests (ensure against build breaks)
- os: linux
compiler: gcc
env: WHICHGCC=6 USE_SIMD=avx2 SKIP_TESTS=1
# build for AVX512, don't run the tests (ensure against build breaks)
- os: linux
compiler: gcc
env: WHICHGCC=7 USE_SIMD=avx2,avx512f,f16c SKIP_TESTS=1
# 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