forked from nanomsg/nng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
104 lines (94 loc) · 2.4 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
96
97
98
99
100
101
102
103
# We use generic to avoid Travis from overriding our compiler choices.
# Variables that can be set:
#
# CC - compiler name to use, e.g. clang-4.0
# BUILD_TYPE - defaults to Debug, can be Release
# CLANG_FORMAT - defaults to "no", set to name of clang-format-4.0 or better
# COVERAGE - defaults to OFF, set to ON to enable code coverage
#
language: generic
sudo: false
matrix:
include:
# stock build (4.8 probably) - we also do a clang-format check here.
- os: linux
dist: trusty
addons:
apt:
sources:
- llvm-toolchain-trusty-4.0
packages:
- colordiff
- clang-format-4.0
env: CLANG_FORMAT=clang-format-4.0
# default gcc 4.9 build - we also do a clang-format check here.
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
packages:
- colordiff
- gcc-4.9
- clang-format-4.0
env: CC=gcc-4.9
# gcc 7 (latest version) build
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
env: CC=gcc-7
# clang v4 build
- os: linux
dist: trusty
addons:
apt:
sources:
- llvm-toolchain-trusty-4.0
packages:
- clang-4.0
env: CC=clang-4.0
# release build using clang 4
- os: linux
dist: trusty
addons:
apt:
sources:
- llvm-toolchain-trusty-4.0
packages:
- clang-4.0
env: CC=clang-4.0 BUILD_TYPE=Release
# code coverage build
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
env: CC=gcc-7 COVERAGE=ON GCOV=gcov-7
# One MacOS X build
- os: osx
env: CC=clang
before_script:
- uname -a
- printenv
- cmake --version
script:
# Perform out-of-source build
- mkdir build
- cd build
# Perform CMake backend generation, build, and test
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DNNG_ENABLE_COVERAGE=${COVERAGE:-OFF} ..
- cmake --build . -- -j4
- ctest --output-on-failure -C ${BUILD_TYPE:-Debug}
- env CLANG_FORMAT=${CLANG_FORMAT:-no} ../etc/format-check.sh
after_success:
- ../etc/codecov.sh