-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
119 lines (106 loc) · 3.69 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
language: cpp
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-5.0
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- bash
- gcc-8
- g++-8
- gcc-7
- g++-7
- cmake
- python3
- python3-pip
# coverity_scan:
# project:
# name: "FOSL/strong_type"
# description: "Build submitted via Travis CI"
# notification_email: [email protected]
# build_command_prepend: "cmake $(python3 ./../script/cmake_release_flags.py) -D ENABLE_COVERAGE:BOOL=TRUE . "
# build_command: "cmake --build . -- -j2"
# branch_pattern: coverity_scan
python:
- 3.7
jobs:
include:
- os: linux
arch: amd64
dist: xenial
env: GCC_VER="7"
compiler: gcc
# - os: linux
# arch: amd64
# env: GCC_VER="6" CMAKE_OPTIONS="-D DYNLOAD_ENABLED:BOOL=FALSE -D MULTITHREAD_SUPPORT_ENABLED:BOOL=FALSE -D USE_STD_MAKE_SHARED:BOOL=TRUE" BUILD_ONLY=1
# compiler: gcc
# - os: linux
# arch: amd64
# env: GCC_VER="7" # CPPCHECK=1 CMAKE_OPTIONS="-D RUN_FUZZY_TESTS:BOOL=TRUE"
# compiler: gcc
- os: linux
arch: amd64
dist: xenial
env: GCC_VER="8" COVERAGE=1 # CPPCHECK=1 CMAKE_OPTIONS="-D RUN_FUZZY_TESTS:BOOL=TRUE"
compiler: gcc
- os: osx
arch: amd64
compiler: clang
osx_image: xcode10
# - os: osx
# arch: amd64
# compiler: clang
# osx_image: xcode10
# env: CLANG_VER="5.0" CMAKE_OPTIONS="-D DYNLOAD_ENABLED:BOOL=FALSE -D MULTITHREAD_SUPPORT_ENABLED:BOOL=FALSE -D USE_STD_MAKE_SHARED:BOOL=TRUE" BUILD_ONLY=1
before_install:
- cd example
- if [ "${GCC_VER}" != "" ]; then
export CXX="g++-${GCC_VER}";
export CC="gcc-${GCC_VER}";
export GCOV="gcov-${GCC_VER}";
fi
- if [ "${CLANG_VER}" != "" ]; then
export CXX="clang++-${CLANG_VER}";
fi
- if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
brew update;
brew install cmake;
brew upgrade cmake;
brew install llvm;
fi
- pip3 install --user --upgrade pip
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
sudo apt remove cmake;
sudo apt update -y --allow-unauthenticated;
sudo apt upgrade -y --allow-unauthenticated;
sudo apt autoremove;
pip3 install --user cmake;
fi
# - pip3 install --user cpp-coveralls
script:
- mkdir build
- cd build
- if [[ "${COVERAGE}" == "1" ]]; then
export CMAKE_OPTIONS="${CMAKE_OPTIONS} -D ENABLE_COVERAGE:BOOL=TRUE";
fi
- cmake $(python3 ./../script/cmake_release_flags.py) ${CMAKE_OPTIONS} ..
- cmake --build . -- -j2
- if [ "${BUILD_ONLY}" != "1" ]; then ctest; fi
- if [ "${COVERAGE}" == "1" ]; then bash <(curl -s https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -x $GCOV -a "-s `pwd`" ; fi
- cd ..
# after_script:
# - if [ "${CPPCHECK}" == 1 ]; then ./script/runcppcheck.sh; fi
notifications:
email:
recipients:
on_success: always
on_failure: always
# webhooks:
# urls:
# - https://webhooks.gitter.im/e/xxxxxxxxxxxxxxxxxxxx
# on_success: change # options: [always|never|change] default: always
# on_failure: always # options: [always|never|change] default: always
# on_start: false # default: false