forked from nanomsg/nng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
59 lines (53 loc) · 1.47 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
# 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:
# clang 4.0 - we also do a clang-format check here.
- os: linux
dist: trusty
addons:
apt:
sources:
- llvm-toolchain-trusty-4.0
packages:
- colordiff
- clang-4.0
- clang-format-4.0
- ninja-build
env: CC=clang-4.0 CLANG_FORMAT=clang-format-4.0
# code coverage build
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
- g++-7
- ninja-build
env: CC=gcc-7 CXX=g++-7 COVERAGE=ON GCOV=gcov-7
# mac OS is currently unusable at Travis, so disabled.
# - os: osx
# env: CC=clang
before_script:
- uname -a
- cmake --version
script:
# Perform out-of-source build
- mkdir build
- cd build
- cmake -G Ninja -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DNNG_ENABLE_COVERAGE=${COVERAGE:-OFF} ..
- ninja
- env CTEST_OUTPUT_ON_FAILURE=1 ninja test
- env CLANG_FORMAT=${CLANG_FORMAT:-no} ../etc/format-check.sh
after_success:
- ../etc/codecov.sh