2018-07-14 13:18:28 +08:00
|
|
|
# cpp takes longer
|
|
|
|
language: minimal
|
2017-03-22 11:12:04 +08:00
|
|
|
sudo: false
|
2016-06-12 03:29:15 +08:00
|
|
|
dist: trusty
|
|
|
|
|
2018-07-14 13:18:28 +08:00
|
|
|
git:
|
|
|
|
depth: false
|
|
|
|
|
2016-06-12 03:29:15 +08:00
|
|
|
notifications:
|
|
|
|
email: false
|
2020-03-22 02:25:39 +08:00
|
|
|
|
2018-07-14 13:18:28 +08:00
|
|
|
# set up build matrix
|
|
|
|
matrix:
|
|
|
|
include:
|
2018-07-14 17:19:54 +08:00
|
|
|
# ============= GCC ==================
|
2018-09-15 15:42:32 +08:00
|
|
|
# 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
|
2020-03-22 02:25:39 +08:00
|
|
|
- RELEASE=OFF
|
|
|
|
|
2018-09-15 15:42:32 +08:00
|
|
|
# ============= GCC ==================
|
|
|
|
# gcc-6, c++11, release build, dynamic linking
|
2018-07-14 13:18:28 +08:00
|
|
|
- os: linux
|
|
|
|
compiler: gcc
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
|
|
|
- g++-6
|
|
|
|
env:
|
|
|
|
- CXX_COMPILER=g++-6
|
|
|
|
- C_COMPILER=gcc-6
|
2018-07-15 17:23:22 +08:00
|
|
|
- CXX_VER=11
|
2018-07-14 16:26:26 +08:00
|
|
|
- BUILD_TYPE=Release
|
2018-07-14 13:18:28 +08:00
|
|
|
- COVERAGE=OFF
|
|
|
|
- STATIC=OFF
|
|
|
|
- SAMPLES=OFF
|
2018-07-28 12:07:39 +08:00
|
|
|
- BENCHMARKS=OFF
|
2020-03-22 02:25:39 +08:00
|
|
|
- RELEASE=OFF
|
|
|
|
|
2018-09-15 15:42:32 +08:00
|
|
|
# gcc-7, c++14, release build, static linking
|
2018-07-14 17:19:54 +08:00
|
|
|
- os: linux
|
|
|
|
compiler: gcc
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
|
|
|
- g++-7
|
|
|
|
env:
|
|
|
|
- CXX_COMPILER=g++-7
|
|
|
|
- C_COMPILER=gcc-7
|
2018-07-15 17:23:22 +08:00
|
|
|
- CXX_VER=14
|
2018-07-14 17:19:54 +08:00
|
|
|
- BUILD_TYPE=Release
|
|
|
|
- COVERAGE=OFF
|
|
|
|
- STATIC=ON
|
2018-07-28 12:07:39 +08:00
|
|
|
- SAMPLES=OFF
|
|
|
|
- BENCHMARKS=OFF
|
2020-03-22 02:25:39 +08:00
|
|
|
- RELEASE=OFF
|
|
|
|
|
2018-09-15 15:42:32 +08:00
|
|
|
# gcc-8, c++17, release build, static linking, samples + benchmarks compiled and run
|
2018-07-14 13:18:28 +08:00
|
|
|
- os: linux
|
|
|
|
compiler: gcc
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
|
|
|
- g++-8
|
|
|
|
env:
|
|
|
|
- CXX_COMPILER=g++-8
|
|
|
|
- C_COMPILER=gcc-8
|
2018-07-15 17:23:22 +08:00
|
|
|
- CXX_VER=17
|
2018-07-14 13:18:28 +08:00
|
|
|
- BUILD_TYPE=Release
|
|
|
|
- COVERAGE=OFF
|
|
|
|
- STATIC=ON
|
|
|
|
- SAMPLES=ON
|
2018-07-28 12:07:39 +08:00
|
|
|
- BENCHMARKS=ON
|
2020-03-22 02:25:39 +08:00
|
|
|
- RELEASE=ON
|
2018-07-14 16:26:26 +08:00
|
|
|
|
2018-07-14 17:19:54 +08:00
|
|
|
# =========== CLANG =============
|
|
|
|
# clang 4, c++11, release build, dynamic linking
|
2018-07-14 15:59:03 +08:00
|
|
|
- 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
|
2018-07-15 17:23:22 +08:00
|
|
|
- CXX_VER=11
|
2018-07-14 15:59:03 +08:00
|
|
|
- BUILD_TYPE=Release
|
|
|
|
- COVERAGE=OFF
|
|
|
|
- STATIC=OFF
|
2018-07-14 16:26:26 +08:00
|
|
|
- SAMPLES=OFF
|
2018-07-28 12:07:39 +08:00
|
|
|
- BENCHMARKS=OFF
|
2020-03-22 02:25:39 +08:00
|
|
|
- RELEASE=OFF
|
|
|
|
|
2018-09-15 15:42:32 +08:00
|
|
|
# clang 5, c++14, release build, dynamic linking
|
2018-07-14 17:19:54 +08:00
|
|
|
- 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
|
2018-07-15 17:23:22 +08:00
|
|
|
- CXX_VER=14
|
2018-07-14 17:19:54 +08:00
|
|
|
- BUILD_TYPE=Release
|
|
|
|
- COVERAGE=OFF
|
|
|
|
- STATIC=ON
|
2018-07-28 12:07:39 +08:00
|
|
|
- SAMPLES=OFF
|
|
|
|
- BENCHMARKS=OFF
|
2020-03-22 02:25:39 +08:00
|
|
|
- RELEASE=OFF
|
|
|
|
|
2018-09-15 15:42:32 +08:00
|
|
|
# clang 6, c++17, release build, static linking, samples + benchmarks compiled and run
|
2018-07-14 13:18:28 +08:00
|
|
|
- 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
|
2018-07-15 17:23:22 +08:00
|
|
|
- CXX_VER=17
|
2018-07-14 13:18:28 +08:00
|
|
|
- BUILD_TYPE=Release
|
|
|
|
- COVERAGE=OFF
|
|
|
|
- STATIC=ON
|
|
|
|
- SAMPLES=ON
|
2018-07-28 12:07:39 +08:00
|
|
|
- BENCHMARKS=ON
|
2020-03-22 02:25:39 +08:00
|
|
|
- RELEASE=ON
|
2018-07-15 17:23:22 +08:00
|
|
|
|
|
|
|
# ============= 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
|
2020-03-22 02:25:39 +08:00
|
|
|
|
2018-07-14 13:18:28 +08:00
|
|
|
before_install:
|
|
|
|
- export CC=${C_COMPILER}
|
|
|
|
- export CXX=${CXX_COMPILER}
|
2015-11-21 10:30:32 +08:00
|
|
|
|
2017-03-22 08:25:52 +08:00
|
|
|
install:
|
2018-07-14 16:26:26 +08:00
|
|
|
- |
|
|
|
|
if [[ "${COVERAGE}" == "ON" ]]; then
|
|
|
|
gem install coveralls-lcov;
|
|
|
|
fi
|
|
|
|
- ${CXX} --version
|
|
|
|
- cmake --version
|
2017-03-22 08:25:52 +08:00
|
|
|
|
2017-03-22 09:07:21 +08:00
|
|
|
script:
|
2018-07-14 16:26:26 +08:00
|
|
|
- mkdir build
|
|
|
|
- cd build
|
2020-03-22 02:25:39 +08:00
|
|
|
- cmake .. -DXLNT_CXX_LANG=${CXX_VER} -DSTATIC=$STATIC -DBENCHMARKS=$BENCHMARKS -DSAMPLES=$SAMPLES -DCOVERAGE=$COVERAGE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DRELEASE=$RELEASE
|
2018-07-14 16:26:26 +08:00
|
|
|
- cmake --build . -- -j2
|
|
|
|
- ./tests/xlnt.test
|
2018-07-28 12:36:36 +08:00
|
|
|
- echo "samples" && echo 'travis_fold:start:samples'
|
2018-07-28 12:07:39 +08:00
|
|
|
- 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'
|
2018-07-28 12:36:36 +08:00
|
|
|
- echo "benchmarks" && echo 'travis_fold:start:benchmarks'
|
2018-07-28 12:07:39 +08:00
|
|
|
- if [[ "${BENCHMARKS}" == "ON" ]]; then ./benchmarks/benchmark-styles; fi
|
|
|
|
- if [[ "${BENCHMARKS}" == "ON" ]]; then ./benchmarks/benchmark-writer; fi
|
|
|
|
- echo 'travis_fold:end:benchmarks'
|
2020-03-22 02:25:39 +08:00
|
|
|
|
2017-03-22 08:25:52 +08:00
|
|
|
|
2017-03-22 08:28:10 +08:00
|
|
|
after_success:
|
2017-03-23 09:41:00 +08:00
|
|
|
- |
|
|
|
|
if [[ "${COVERAGE}" == "ON" ]]; then
|
2017-03-24 08:08:21 +08:00
|
|
|
lcov --directory source/CMakeFiles/xlnt.dir --capture --output-file coverage.info --base-directory ../source --no-external --gcov-tool /usr/bin/gcov-6
|
2017-04-21 02:57:25 +08:00
|
|
|
lcov --output-file coverage.info --remove coverage.info source/detail/serialization/miniz.cpp
|
2017-04-20 12:31:29 +08:00
|
|
|
i=$(dirname $(pwd))
|
|
|
|
sed -i "s|$i/||" coverage.info
|
2017-04-20 12:56:18 +08:00
|
|
|
cd ..
|
|
|
|
coveralls-lcov build/coverage.info
|
2017-03-23 09:41:00 +08:00
|
|
|
fi
|
2020-03-22 02:25:39 +08:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key:
|
2020-03-22 02:36:45 +08:00
|
|
|
secure: "EJKEQkbmNFyXAJYOro7/wSlxSns4O4RAmht5PCBYuOgEqIbB1+QbQjNZd18KyCkqaHQEvww4hVGMdcFsTFnsznjGo6NnDtiYTdhiREtdUd6ohUD0eHTZ15ZL7mW1XR8HWqvv33piDX40UI/dFn1XYLnWunaLZvF5WPa9bzTsloaYHbjxoRw5S4fd0VyqZ2w2zuezCCRUezDcNGOxbVTbB3moSh+hpjrNkw7YxoPNm48CwGRVeRj28XuhDjobfRtPSZMb6Y+EDUnrIZI1mKvB1bkL8QR2ndBtqlG0BWvmEcdDuiQnraJk3iRIAU5T/ycyRqR2UKcW2Fv0iVp5SL9VuqhcvIUxTsYXzuNOZ3hKiWRTj6ndG+gDBsD1K5YwScZksAImwvj/VGEla9Q044W3PbYV2GUE++8mtiZUaxbkaP+uDFUBR5eXqAkte9mainwJ3eaMJ7Tx1KCqkzKO011nUasWfmBWxRUA8vm44SfzwzVfjXToLQZGe4KYzF2cHaXo2YIC48vE/DYs3VnVvnrCjNDO8Cr3m+lfdulhjIZlg+WymQcxuJs7LVzCW7mBPNnrUNOOrGCGP4f/hFxBLk8/eJDznIAzbW27Z1zAHn+MlbADRBzC0Y7cmme4Zu2W7Wy9NTvzNsKabOH/Fe1TfGetEEf6mZ5g7Q3+oZPJ2raLFD8="
|
2020-03-22 02:25:39 +08:00
|
|
|
file_glob: true
|
|
|
|
file: build/*.tar.gz
|
|
|
|
skip_cleanup: true
|
|
|
|
overwite: true
|
|
|
|
on:
|
|
|
|
repo: tfussell/xlnt
|
|
|
|
tags: true
|