-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
81 lines (72 loc) · 2.06 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
language: c
matrix:
include:
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- MATRIX_EVAL="CC=gcc"
- os: linux
dist: trusty
sudo: required
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
env:
- MATRIX_EVAL="CC=gcc-7"
- os: linux
dist: trusty
sudo: required
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.6
packages:
- clang-3.6
env:
- MATRIX_EVAL="CC=clang-3.6"
- os: linux
dist: trusty
sudo: required
addons:
apt:
sources:
- llvm-toolchain-trusty-5.0
packages:
- clang-5.0
env:
- MATRIX_EVAL="CC=clang-5.0"
env:
global:
- ENABLE_TESTING=OFF
before_install:
- eval "${MATRIX_EVAL}"
- test "${CC}" = "gcc" && ENABLE_TESTING=ON || true
- test "${CC}" = "clang-5.0" && ENABLE_TESTING=ON || true
- echo "CC=${CC}"
- echo "ENABLE_TESTING=${ENABLE_TESTING}"
install:
# Use clean dependencies installation to avoid versions collision.
- export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Install CMake
- wget https://cmake.org/files/v3.10/cmake-3.10.3-Linux-x86_64.sh
- sudo bash cmake-3.10.3-Linux-x86_64.sh --skip-license --exclude-subdir --prefix=/usr/local
before_script:
# Check installation
- ${CC} --version
- cmake --version
# Configure common CMake options
- CMAKE_ARGS="-DENABLE_TESTING=${ENABLE_TESTING}"
- CMAKE_ARGS+=" -DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/install"
- echo "CMake arguments ${CMAKE_ARGS}"
script:
- cmake -H"${TRAVIS_BUILD_DIR}" -B"${TRAVIS_BUILD_DIR}/build" ${CMAKE_ARGS}
- cmake --build "${TRAVIS_BUILD_DIR}/build" -- -j4
- if [ "${ENABLE_TESTING}" == "ON" ]; then cmake --build "${TRAVIS_BUILD_DIR}/build" --target test -- ARGS="-VV"; fi
after_success:
- cmake --build "${TRAVIS_BUILD_DIR}/build" --target install