This repository has been archived by the owner on May 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
59 lines (54 loc) · 1.67 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
os: linux
sudo: false
language: python
env:
- CXX=g++
- CXX=clang++
python:
- "2.7"
- "3.4"
cache:
directories:
- llvm-3.8.0
- cmake
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.9
- g++-4.9
script:
- export BASEDIR=`pwd`
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
if [ -z "$(ls -A cmake)" ]; then
CMAKE_URL="https://cmake.org/files/v3.6/cmake-3.6.0-rc2-Linux-x86_64.tar.gz";
mkdir -p cmake;
travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake;
fi;
export PATH=${BASEDIR}/cmake/bin:${PATH};
else
brew install cmake;
fi;
-
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
export LLVM_VERSION=3.8.0;
if [ -z "$(ls -A llvm-$LLVM_VERSION)" ]; then
wget -O llvm-$LLVM_VERSION.tar.xz http://llvm.org/releases/$LLVM_VERSION/clang+llvm-$LLVM_VERSION-x86_64-linux-gnu-ubuntu-14.04.tar.xz;
mkdir llvm-$LLVM_VERSION;
xzcat llvm-$LLVM_VERSION.tar.xz | tar -xvf - --strip 1 -C llvm-$LLVM_VERSION;
fi;
llvm-$LLVM_VERSION/bin/llvm-config --version;
export LLVM_CONFIG="llvm-$LLVM_VERSION/bin/llvm-config";
fi;
export LD_LIBRARY_PATH=$BASEDIR/llvm-$LLVM_VERSION/lib:$LD_LIBRARY_PATH
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.9"; export CC="gcc-4.9"; fi
- if [ "$CXX" = "clang++" ]; then export CXX=$BASEDIR/llvm-$LLVM_VERSION/bin/clang++; export CC=$BASEDIR/llvm-$LLVM_VERSION/bin/clang; fi
- mkdir build
- cd build
- mkdir -p install_dir
- cmake -DCMAKE_INSTALL_PREFIX=`pwd`/install_dir ..
- make VERBOSE=1
- make install
after_failure:
- cat build/config.log