-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
93 lines (84 loc) · 2.18 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
language: cpp
matrix:
include:
# MACOS: DEBUG
- os: osx
osx_image: xcode10
compiler: clang
env:
- CONFIG=Debug
- COVERAGE=ON
addons:
homebrew:
packages:
- lcov
# MACOS: RELEASE
- os: osx
osx_image: xcode10
compiler: clang
env:
- CONFIG=Release
- COVERAGE=OFF
# LINUX: DEBUG
- os: linux
dist: bionic
sudo: required
compiler: gcc
env:
- CONFIG=Debug
- COVERAGE=ON
addons:
apt:
packages:
- lcov
# LINUX: RELEASE
- os: linux
dist: bionic
sudo: required
compiler: gcc
env:
- CONFIG=Release
- COVERAGE=OFF
install:
- JOBS=2
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
export CC=${CC_COMPILER}
export CXX=${CXX_COMPILER}
alias python=python3
sudo pip install conan
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update
brew install conan
brew install cmake || brew upgrade cmake
fi
- cmake --version
- conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
script:
- git submodule update --init --recursive
- mkdir build
- cd build
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
export CFLAGS="$CFLAGS -DHAVE_UNISTD_H"
conan install .. --build missing -s cppstd=17
elif [ "$TRAVIS_OS_NAME" == "linux" ]; then
conan install .. --build missing -s compiler.libcxx=libstdc++11
fi
- cmake .. -DCMAKE_BUILD_TYPE=${CONFIG} -DBUILD_ARCC_TESTS=ON -DBUILD_CODE_COVERAGE=${COVERAGE}
- cmake --build . --config "${CONFIG}" -- -j3 VERBOSE=1
- ctest -C "${CONFIG}" --output-on-failure
after_success:
- |
if [[ "$COVERAGE" == "ON" ]]; then
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' --output-file coverage.info
lcov --list coverage.info
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"
fi
notifactions:
email:
recipients:
on_suucess: never
on_failure: always