-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
95 lines (88 loc) · 3.44 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
language: cpp
before_script:
- export CODECOV_TOKEN=5cfca0f2-2ece-4a2e-9f02-5fe479e96813
script:
- which cmake
- cmake -Btst/bin -Htst -DCMAKE_BUILD_TYPE=Debug
- pwd
- ls
- cd tst/bin
- make clean
- make cat
- ./cat
# Codecov
- /Users/travis/build/nyanzebra/cat/get_code_coverage.sh
- codecov
before_install:
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir -p "${DEPS_DIR}"
- cd "${DEPS_DIR}"
- echo "$TRAVIS_OS_NAME"
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install cmake || brew upgrade cmake;
brew install python || brew upgrade python;
pip2 install codecov;
fi
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="https://cmake.org/files/v3.9/cmake-3.9.1-Linux-x86_64.tar.gz"
mkdir cmake && travis_retry wget --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
pip install codecov
fi
#https://github.com/Microsoft/GSL/blob/master/.travis.yml
install:
# Dependencies required by the CI are installed in ${TRAVIS_BUILD_DIR}/deps/
# - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
# - mkdir -p "${DEPS_DIR}"
- cd "${DEPS_DIR}"
############################################################################
# Install a recent CMake (unless already installed on OS X)
############################################################################
# - |
# if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
# CMAKE_URL="https://cmake.org/files/v3.9/cmake-3.9.1-Linux-x86_64.tar.gz"
# mkdir cmake && travis_retry wget --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
# export PATH=${DEPS_DIR}/cmake/bin:${PATH}
# else
# brew install cmake || brew upgrade cmake
# fi
- cmake --version
############################################################################
# [linux]: Install the right version of libc++
############################################################################
- |
LLVM_INSTALL=${DEPS_DIR}/llvm/install
# if in linux and compiler clang and llvm not installed
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
LLVM_VERSION="3.9.1";
LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz"
LIBCXX_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxx-${LLVM_VERSION}.src.tar.xz"
LIBCXXABI_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxxabi-${LLVM_VERSION}.src.tar.xz"
mkdir -p llvm llvm/build llvm/projects/libcxx llvm/projects/libcxxabi
travis_retry wget -O - ${LLVM_URL} | tar --strip-components=1 -xJ -C llvm
travis_retry wget -O - ${LIBCXX_URL} | tar --strip-components=1 -xJ -C llvm/projects/libcxx
travis_retry wget -O - ${LIBCXXABI_URL} | tar --strip-components=1 -xJ -C llvm/projects/libcxxabi
(cd llvm/build && cmake .. -DCMAKE_INSTALL_PREFIX=${LLVM_INSTALL})
(cd llvm/build/projects/libcxx && make install -j2)
(cd llvm/build/projects/libcxxabi && make install -j2)
export CXXFLAGS="-isystem ${LLVM_INSTALL}/include/c++/v1"
export LDFLAGS="-L ${LLVM_INSTALL}/lib -l c++ -l c++abi"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${LLVM_INSTALL}/lib"
fi
- cd "${TRAVIS_BUILD_DIR}"
matrix:
allow_failures:
- os: linux
include:
- os: linux
sudo: required
- os: osx
#- os: windows
compiler:
- clang++
- g++
after_success:
# Codecov
- bash <(curl -s https://codecov.io/bash)