forked from alembic/alembic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
103 lines (95 loc) · 2.65 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
language: cpp
cache:
apt: true
matrix:
include:
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- zlib1g-dev
env: COMPILER=g++-4.8
- compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
packages:
- clang-3.7
- zlib1g-dev
env: COMPILER=clang-3.7
env:
global:
- NUM_CPU="`grep processor /proc/cpuinfo | wc -l`"; echo $NUM_CPU
- BUILD_TYPE="RELEASE"
- ALEMBIC_SOURCE=${TRAVIS_BUILD_DIR}
- ALEMBIC_BUILD=${TRAVIS_BUILD_DIR}/build
- ALEMBIC_INSTALL=${ALEMBIC_BUILD}/install
# OPENEXR
- OPENEXR_ROOT=${HOME}/openexr
- OPENEXR_SOURCE=${OPENEXR_ROOT}/source
- ILMBASE_BUILD=${OPENEXR_ROOT}/IlmBasebuild
- OPENEXR_INSTALL=${OPENEXR_ROOT}/install
# CMAKE
- CMAKE_URL="https://cmake.org/files/v3.4/cmake-3.4.1-Linux-x86_64.tar.gz"
- CMAKE_ROOT=${HOME}/cmake
- CMAKE_SOURCE=${CMAKE_ROOT}/source
- CMAKE_INSTALL=${CMAKE_ROOT}/install
before_install:
# CMAKE download and install
- >
if [ "$(ls -A ${CMAKE_INSTALL})" ]; then
echo "CMake found in cache.";
else
mkdir --parent ${CMAKE_SOURCE}
mkdir --parent ${CMAKE_INSTALL}
travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${CMAKE_INSTALL}
fi
- export PATH=${CMAKE_INSTALL}/bin:${PATH};
- cmake --version
# OPENEXR
- >
if [ "$(ls -A $OPENEXR_INSTALL)" ]; then
echo "OpenEXR found in cache.";
else
mkdir --parent $OPENEXR_SOURCE
mkdir --parent $ILMBASE_BUILD
mkdir --parent $OPENEXR_INSTALL
travis_retry wget https://github.com/openexr/openexr/archive/v2.2.0.tar.gz;
tar -xf v2.2.0.tar.gz;
mv openexr-2.2.0/* $OPENEXR_SOURCE;
fi
install:
# OPENEXR only IlmBase is required
- >
if [ ! "$(ls -A $OPENEXR_INSTALL)" ]; then
cd $ILMBASE_BUILD
cmake \
-DCMAKE_INSTALL_PREFIX=$OPENEXR_INSTALL \
$OPENEXR_SOURCE/IlmBase;
make -j 2 > null;
make install;
fi
before_script:
# Create build folder
- mkdir --parent $ALEMBIC_BUILD
- cd $ALEMBIC_BUILD
# Classic release build
- >
cmake $ALEMBIC_SOURCE \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$ALEMBIC_INSTALL \
-DILMBASE_ROOT=$OPENEXR_INSTALL;
script:
# limit GCC builds to a reduced number of thread for the virtual machine
- make install -j 2 VERBOSE=1
# Perform unit tests
- make test
cache:
directories:
- $OPENEXR_INSTALL
- $CMAKE_INSTALL