forked from tfussell/xlnt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
231 lines (215 loc) · 6.31 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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# cpp takes longer
language: minimal
sudo: false
dist: trusty
git:
depth: false
notifications:
email: false
# set up build matrix
matrix:
include:
# ============= GCC ==================
# gcc-5, c++11, release build, dynamic linking
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
- CXX_COMPILER=g++-5
- C_COMPILER=gcc-5
- CXX_VER=11
- BUILD_TYPE=Release
- COVERAGE=OFF
- STATIC=OFF
- SAMPLES=OFF
- BENCHMARKS=OFF
- RELEASE=OFF
# ============= GCC ==================
# gcc-6, c++11, release build, dynamic linking
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- CXX_COMPILER=g++-6
- C_COMPILER=gcc-6
- CXX_VER=11
- BUILD_TYPE=Release
- COVERAGE=OFF
- STATIC=OFF
- SAMPLES=OFF
- BENCHMARKS=OFF
- RELEASE=OFF
# gcc-7, c++14, release build, static linking
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- CXX_COMPILER=g++-7
- C_COMPILER=gcc-7
- CXX_VER=14
- BUILD_TYPE=Release
- COVERAGE=OFF
- STATIC=ON
- SAMPLES=OFF
- BENCHMARKS=OFF
- RELEASE=OFF
# gcc-8, c++17, release build, static linking, samples + benchmarks compiled and run
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
env:
- CXX_COMPILER=g++-8
- C_COMPILER=gcc-8
- CXX_VER=17
- BUILD_TYPE=Release
- COVERAGE=OFF
- STATIC=ON
- SAMPLES=ON
- BENCHMARKS=ON
- RELEASE=ON
# =========== CLANG =============
# clang 4, c++11, release build, dynamic linking
- os: linux
compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
packages:
- clang-4.0
env:
- CXX_COMPILER=clang++-4.0
- C_COMPILER=clang-4.0
- CXX_VER=11
- BUILD_TYPE=Release
- COVERAGE=OFF
- STATIC=OFF
- SAMPLES=OFF
- BENCHMARKS=OFF
- RELEASE=OFF
# clang 5, c++14, release build, dynamic linking
- os: linux
compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
packages:
- clang-5.0
env:
- CXX_COMPILER=clang++-5.0
- C_COMPILER=clang-5.0
- CXX_VER=14
- BUILD_TYPE=Release
- COVERAGE=OFF
- STATIC=ON
- SAMPLES=OFF
- BENCHMARKS=OFF
- RELEASE=OFF
# clang 6, c++17, release build, static linking, samples + benchmarks compiled and run
- os: linux
compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
packages:
- clang-6.0
env:
- CXX_COMPILER=clang++-6.0
- C_COMPILER=clang-6.0
- CXX_VER=17
- BUILD_TYPE=Release
- COVERAGE=OFF
- STATIC=ON
- SAMPLES=ON
- BENCHMARKS=ON
- RELEASE=ON
# ============= CODE COVERAGE ===============
# gcc-6, c++11, debug build, static linking, code coverage enabled
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- lcov
env:
- CXX_COMPILER=g++-6
- C_COMPILER=gcc-6
- CXX_VER=11
- BUILD_TYPE=Debug
- COVERAGE=ON
- STATIC=ON
- SAMPLES=OFF
before_install:
- export CC=${C_COMPILER}
- export CXX=${CXX_COMPILER}
install:
- |
if [[ "${COVERAGE}" == "ON" ]]; then
gem install coveralls-lcov;
fi
- ${CXX} --version
- cmake --version
script:
- mkdir build
- cd build
- cmake .. -DXLNT_CXX_LANG=${CXX_VER} -DSTATIC=$STATIC -DBENCHMARKS=$BENCHMARKS -DSAMPLES=$SAMPLES -DCOVERAGE=$COVERAGE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DRELEASE=$RELEASE
- cmake --build . -- -j2
- ./tests/xlnt.test
- echo "samples" && echo 'travis_fold:start:samples'
- if [[ "${SAMPLES}" == "ON" ]]; then ./samples/sample-decrypt; fi
- if [[ "${SAMPLES}" == "ON" ]]; then ./samples/sample-img2xlsx "../samples/data/cafe.jpg" "img.xlsx"; fi
- if [[ "${SAMPLES}" == "ON" ]]; then ./samples/sample-documentation; fi
- echo 'travis_fold:end:samples'
- echo "benchmarks" && echo 'travis_fold:start:benchmarks'
- if [[ "${BENCHMARKS}" == "ON" ]]; then ./benchmarks/benchmark-styles; fi
- if [[ "${BENCHMARKS}" == "ON" ]]; then ./benchmarks/benchmark-writer; fi
- echo 'travis_fold:end:benchmarks'
after_success:
- |
if [[ "${COVERAGE}" == "ON" ]]; then
lcov --directory source/CMakeFiles/xlnt.dir --capture --output-file coverage.info --base-directory ../source --no-external --gcov-tool /usr/bin/gcov-6
lcov --output-file coverage.info --remove coverage.info source/detail/serialization/miniz.cpp
i=$(dirname $(pwd))
sed -i "s|$i/||" coverage.info
cd ..
coveralls-lcov build/coverage.info
fi
deploy:
provider: releases
api_key:
secure: "EJKEQkbmNFyXAJYOro7/wSlxSns4O4RAmht5PCBYuOgEqIbB1+QbQjNZd18KyCkqaHQEvww4hVGMdcFsTFnsznjGo6NnDtiYTdhiREtdUd6ohUD0eHTZ15ZL7mW1XR8HWqvv33piDX40UI/dFn1XYLnWunaLZvF5WPa9bzTsloaYHbjxoRw5S4fd0VyqZ2w2zuezCCRUezDcNGOxbVTbB3moSh+hpjrNkw7YxoPNm48CwGRVeRj28XuhDjobfRtPSZMb6Y+EDUnrIZI1mKvB1bkL8QR2ndBtqlG0BWvmEcdDuiQnraJk3iRIAU5T/ycyRqR2UKcW2Fv0iVp5SL9VuqhcvIUxTsYXzuNOZ3hKiWRTj6ndG+gDBsD1K5YwScZksAImwvj/VGEla9Q044W3PbYV2GUE++8mtiZUaxbkaP+uDFUBR5eXqAkte9mainwJ3eaMJ7Tx1KCqkzKO011nUasWfmBWxRUA8vm44SfzwzVfjXToLQZGe4KYzF2cHaXo2YIC48vE/DYs3VnVvnrCjNDO8Cr3m+lfdulhjIZlg+WymQcxuJs7LVzCW7mBPNnrUNOOrGCGP4f/hFxBLk8/eJDznIAzbW27Z1zAHn+MlbADRBzC0Y7cmme4Zu2W7Wy9NTvzNsKabOH/Fe1TfGetEEf6mZ5g7Q3+oZPJ2raLFD8="
file_glob: true
file: build/*.tar.gz
skip_cleanup: true
overwite: true
on:
repo: tfussell/xlnt
tags: true