-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
54 lines (45 loc) · 3.13 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
language: c
os:
- linux
- osx
compiler:
- gcc
- clang
env:
- TEST_APP_CONFIG=Debug
- TEST_APP_CONFIG=Release
matrix:
include:
- compiler: clang "Clang-4.0.0-Debug"
env: TEST_APP_CONFIG=Debug COMPILER_CLANG_4=yes
os: osx
- compiler: clang "Clang-4.0.0-Release"
env: TEST_APP_CONFIG=Release COMPILER_CLANG_4=yes
os: osx
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget --no-check-certificate http://cmake.org/files/v3.8/cmake-3.8.0-Linux-x86_64.tar.gz ;fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar -xzf cmake-3.8.0-Linux-x86_64.tar.gz ;fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=$PWD/cmake-3.8.0-Linux-x86_64/bin:$PATH ;fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget --no-check-certificate http://cmake.org/files/v3.8/cmake-3.8.0-Darwin-x86_64.tar.gz ;fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar -xzf cmake-3.8.0-Darwin-x86_64.tar.gz ;fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=$PWD/cmake-3.8.0-Darwin-x86_64/CMake.app/Contents/bin:$PATH ;fi
# Clang 4.0.0 setup (Linux)
- if [[ "$TRAVIS_OS_NAME" == "linux" && -n "$COMPILER_CLANG_4" ]]; then wget --no-check-certificate http://releases.llvm.org/4.0.0/clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz ;fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && -n "$COMPILER_CLANG_4" ]]; then tar -xzf clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz ;fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && -n "$COMPILER_CLANG_4" ]]; then export CLANG_4_PATH=$(PWD)/clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-14.04/ ;fi
# Clang 4.0.0 setup (OSX)
- if [[ "$TRAVIS_OS_NAME" == "osx" && -n "$COMPILER_CLANG_4" ]]; then wget --no-check-certificate http://releases.llvm.org/4.0.0/clang+llvm-4.0.0-x86_64-apple-darwin.tar.xz ;fi
- if [[ "$TRAVIS_OS_NAME" == "osx" && -n "$COMPILER_CLANG_4" ]]; then tar -xzf clang+llvm-4.0.0-x86_64-apple-darwin.tar.xz ;fi
- if [[ "$TRAVIS_OS_NAME" == "osx" && -n "$COMPILER_CLANG_4" ]]; then export CLANG_4_PATH=$(PWD)/clang+llvm-4.0.0-x86_64-apple-darwin/ ;fi
before_script:
- if [[ -n "$COMPILER_CLANG_4" ]]; then export PATH="${CLANG_4_PATH}/bin:$PATH" ;fi
- if [[ -n "$COMPILER_CLANG_4" ]]; then export CC="clang" ;fi
- if [[ -n "$COMPILER_CLANG_4" ]]; then export CCFLAGS="$CCFLAGS -I${CLANG_4_PATH}/include" ;fi
- if [[ -n "$COMPILER_CLANG_4" ]]; then export LDFLAGS="$LDFLAGS -L${CLANG_4_PATH}/lib" ;fi
script:
- mkdir build_$TEST_APP_CONFIG
- cd build_$TEST_APP_CONFIG
- cmake ..
- cmake --build . --config $TEST_APP_CONFIG
after_script:
- ./test_app