forked from halide/Halide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (53 loc) · 2.35 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
language: cpp
compiler:
# Comment out for now to keep build matrix small
#- clang
- gcc
env:
global:
- BAZEL_VERSION="0.6.1"
- JDK=openjdk8
# The Travis Ubuntu Trusty environment we run in currently promises 2 cores,
# so running lengthy make steps with -j2 is almost certainly a win.
- MAKEFLAGS=-j2
matrix:
# Configurations
#
# Each line in the ``env`` section represents a set of environment
# variables passed to a build configuration
#
# Test a mix of llvm versions, a mix of build systems, and a mix of shared vs static library
# Don't build as a static library with cmake. It risks exceeding the travis memory limit.
- LLVM_VERSION=4.0.1 BUILD_SYSTEM=MAKE CXX_=g++-4.8 CC_=gcc-4.8
- LLVM_VERSION=5.0.0 BUILD_SYSTEM=MAKE CXX_=g++-4.8 CC_=gcc-4.8
- LLVM_VERSION=4.0.1 BUILD_SYSTEM=CMAKE CXX_=g++-4.8 CC_=gcc-4.8 HALIDE_SHARED_LIBRARY=1
cache: apt ccache
dist: trusty
# Note the commands below are written assuming Ubuntu 12.04LTS
before_install:
# Needed for new libstdc++ and gcc4.8
- export CXX=${CXX_}
- export CC=${CC_}
- sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test/
- sudo apt-get update
- wget https://github.com/bazelbuild/bazel/releases/download/"${BAZEL_VERSION}"/bazel_"${BAZEL_VERSION}"-linux-x86_64.deb
- sudo dpkg -i bazel_"${BAZEL_VERSION}"-linux-x86_64.deb
install:
- sudo apt-get -y --force-yes install ${CXX} ${CC} libedit-dev
# Make gcc4.8 the default gcc version
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/${CC} 20
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/${CXX} 20
# Download the right llvm release
- wget http://llvm.org/releases/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-debian8.tar.xz
- tar xvf clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-debian8.tar.xz
- sudo mv clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-debian8 /usr/local/llvm
# Get libpng for the tutorials and apps
- sudo apt-get -y --force-yes install libpng-dev
# For generating docs
- sudo apt-get -y --force-yes --no-install-recommends install doxygen
# Grab a version of CMake >= 3.4
- wget --no-check-certificate https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.sh
- chmod a+x cmake-3.5.2-Linux-x86_64.sh
- sudo ./cmake-3.5.2-Linux-x86_64.sh --skip-license --prefix=/usr/local
script:
- test/scripts/build_travis.sh