This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
/
.travis.yml
72 lines (65 loc) · 2.11 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
language: cpp
os:
- linux
- osx
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.9
packages:
- libstdc++-4.9-dev
- liblua5.1-0-dev
- lua5.1
- libboost-dev
- g++-4.9
- g++-5
- clang-3.9
- libclang-3.9-dev
- llvm-3.9
- llvm-3.9-dev
env:
- DOWNLOAD_CLANG=1 COMPILER=g++-4.9 GCC_VERSION=4.9
# - DOWNLOAD_CLANG=0 COMPILER=g++-4.9 GCC_VERSION=4.9 LLVM_CONFIG="llvm-config-3.8"
- DOWNLOAD_CLANG=1 COMPILER=clang++-3.9 CLANG_VERSION=3.9
# - DOWNLOAD_CLANG=0 COMPILER=clang++-3.8 CLANG_VERSION=3.8 LLVM_CONFIG="llvm-config-3.8"
matrix:
exclude:
- os: osx
env: DOWNLOAD_CLANG=1 COMPILER=g++-4.9 GCC_VERSION=4.9
before_install:
- if [ -n "$GCC_VERSION" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
- if [ -n "$CLANG_VERSION" ]; then export CXX="clang++-${CLANG_VERSION}" CC="clang-${CLANG_VERSION}"; fi
install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew install lua;
if [ -n "$CLANG_VERSION" ]; then export CXX="clang++" CC="clang"; fi;
if [ "$DOWNLOAD_CLANG" == 0 ]; then
brew update;
brew tap homebrew/versions;
brew install homebrew/versions/llvm38;
fi;
fi
script:
- export OUTSOURCE=$PWD/build
- export SOURCEPATH=$PWD
- mkdir -p $OUTSOURCE
- |
if [ -n "$LLVM_CONFIG" ]; then
(cd $OUTSOURCE && cmake $SOURCEPATH -DLLVM_CONFIG=$(which ${LLVM_CONFIG}) -DDOWNLOAD_CLANG=$DOWNLOAD_CLANG)
else
(cd $OUTSOURCE && cmake $SOURCEPATH -DDOWNLOAD_CLANG=$DOWNLOAD_CLANG)
fi
- cd $OUTSOURCE && make && make install
- cd $SOURCEPATH && echo "os.exit()" | lua -l color_coded
- if [ "$DOWNLOAD_CLANG" == 1 ]; then cd $SOURCEPATH && mv $OUTSOURCE/clang* . && rm -rf $OUTSOURCE; fi;
- |
if [ -n "$LLVM_CONFIG" ]; then
cmake . -DLLVM_CONFIG=$(which ${LLVM_CONFIG}) -DDOWNLOAD_CLANG=$DOWNLOAD_CLANG
else
cmake . -DDOWNLOAD_CLANG=$DOWNLOAD_CLANG
fi
- make && make install
- cd $SOURCEPATH && echo "os.exit()" | lua -l color_coded
- cd $SOURCEPATH && make color_coded_test || true