forked from Snaipe/Criterion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
169 lines (155 loc) · 3.98 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
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
# 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
else
TERM=dumb cmake --build . -- -j4
fi
after_success:
- |
if [ "$COVERAGE" = "ON" ]; then
make gcov
bash <(curl -s https://codecov.io/bash)
fi
after_failure:
- |
if [ "${TESTS:-ON}" = "ON" ]; then
cat Testing/Temporary/LastTest.log samples/*.{out,err} ../samples/tests/*.{out,err}
fi
before_deploy:
- make install
- tar -cvjf criterion-${TRAVIS_TAG}-${TRAVIS_OS_NAME}-x86_64.tar.bz2 criterion-${TRAVIS_TAG}
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
on:
repo: Snaipe/Criterion
tags: true
condition: $DEPLOY = true