forked from Snaipe/Criterion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
185 lines (171 loc) · 4.56 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
language: c
sudo: false
addons:
apt:
sources:
- deadsnakes
packages:
- python3.5
_anchors:
- &gcc49-packages
apt:
sources:
- ubuntu-toolchain-r-test
- deadsnakes
packages:
- python3.5
- gcc-4.9
- g++-4.9
- gobjc-4.9
- gnustep-devel
matrix:
include:
# Linux Debug, GCC 4.9
- compiler: gcc-4.9
addons: *gcc49-packages
env:
CONFIGURATION: Debug
GCOV: gcov-4.9
COVERAGE: "ON"
# Linux Release, GCC 4.9
- compiler: gcc-4.9
addons: *gcc49-packages
env:
CONFIGURATION: Release
# Linux RelWithDebInfo, GCC 4.9
- compiler: gcc-4.9
addons: *gcc49-packages
env:
CONFIGURATION: RelWithDebInfo
DEPLOY: true
# Linux Debug, GCC 4.6
- compiler: gcc
env: CONFIGURATION=Debug TESTS=OFF
# Linux Release, GCC 4.6
- compiler: gcc
env: CONFIGURATION=Release TESTS=OFF
# Linux RelWithDebInfo, GCC 4.6
- compiler: gcc
env:
- CONFIGURATION=RelWithDebInfo
- TESTS=OFF
# Coverity token
- secure: >-
n6BHG86ISeYSAVE/i7m1K+XVW0j8PrJ5JxoJwhAGBb1
hkCn9sWybGo1HzZsf7rxpkQh/5Va4i+eyOrUt7VWAuF
EJN2+mEWqERkWZxiXrS3N9xi74cPFI79eDOTFnPm13e
diUX8Ts+IuFy890+tsNHqkEn055l6yOVMtj1LWWtRs=
# OSX Debug, GCC 4.9
- os: osx
compiler: gcc-4.9
env:
CONFIGURATION: Debug
GCOV: gcov-4.9
COVERAGE: "ON"
# OSX Release, GCC 4.9
- os: osx
compiler: gcc-4.9
env: CONFIGURATION=Release
# OSX RelWithDebInfo, GCC 4.9
- os: osx
compiler: gcc-4.9
env: CONFIGURATION=RelWithDebInfo
# OSX Debug, Clang
- os: osx
compiler: clang
env:
CONFIGURATION: Debug
# OSX Release, Clang
- os: osx
compiler: clang
env:
CONFIGURATION: Release
# OSX RelWithDebInfo, Clang
- os: osx
compiler: clang
env:
CONFIGURATION: RelWithDebInfo
DEPLOY: true
allow_failures:
- compiler: gcc
before_install:
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew update
brew install pcre
fi
- |
if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$CC" = "clang" ]; then
brew unlink cmake
brew install llvm cmake
fi
- |
if [ "${TESTS:-ON}" = "ON" ]; then
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew install python3
export PATH="$(python3 -m site --user-base)/bin:$PATH"
export PYTHON_BIN="python3"
else
curl -L https://bootstrap.pypa.io/get-pip.py | python3.5 - --user
export PYTHON_BIN="python3.5"
fi
pip3 install --user cram==0.6
# Patch buggy cram on OSX
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
patch "$(python3 -m site --user-base)/lib/python/site-packages/cram.py" .cmake/cram-osx.patch
fi
cram --version
fi
- export CXX=${CC/gcc/g++}; export CXX=${CXX/clang/clang++}
- $CC --version
- $CXX --version
script:
- mkdir -p build && cd $_
- >
cmake
-Wno-dev
-DCTESTS=${TESTS:-ON}
-DCOVERALLS=${COVERAGE:-OFF}
-DCMAKE_BUILD_TYPE=${CONFIGURATION}
-DCMAKE_INSTALL_PREFIX=criterion-${TRAVIS_TAG}
${CMAKE_OPTS}
..
- |
if [ "${TESTS:-ON}" = "ON" ]; then
TERM=dumb cmake --build . --target criterion_tests -- -j4
ctest --output-on-failure
else
TERM=dumb cmake --build . -- -j4
fi
after_success:
- |
if [ "$COVERAGE" = "ON" ]; then
make gcov
bash <(curl -s https://codecov.io/bash)
fi
before_deploy:
- make install
- tar -cvjf criterion-${TRAVIS_TAG}-${TRAVIS_OS_NAME}-x86_64.tar.bz2 criterion-${TRAVIS_TAG}
- cd ..
- ./.cmake/git-archive-all.sh --prefix criterion-${TRAVIS_TAG} criterion-${TRAVIS_TAG}.tar && bzip2 $_
addons:
coverity_scan:
project:
name: "Snaipe/Criterion"
description: "A KISS, Cross-platform C unit testing framework"
notification_email: [email protected]
build_command_prepend: "cmake ."
build_command: "make -j4"
branch_pattern: coverity_scan
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: d3l2Ohb2FF3tSXku1d0ASR5dntdnQ48Jyc39IEloDBxFXCselCkYruUQv6p0TA3P+Dmrz4wS7/AFlBMMsQ3XfGFVIOnITiTaGWg5fEpIf7zYsDf0zECPE0MOHMGqJMn3/SrSKdtEA4N84Q4JS7Ou+ewG65mxUDO5Ce60OoEG5JA=
file:
- criterion-${TRAVIS_TAG}-${TRAVIS_OS_NAME}-x86_64.tar.bz2
- criterion-${TRAVIS_TAG}.tar.bz2
on:
repo: Snaipe/Criterion
tags: true
condition: $DEPLOY = true