gmio/.travis.yml

68 lines
2.0 KiB
YAML
Raw Normal View History

2015-06-26 00:05:02 +08:00
language: cpp
sudo: false
_anchors:
- &gcc49-packages
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.9
- g++-4.9
matrix:
include:
# Linux GCC-4.6 debug tests_coverage
- compiler: gcc
env: TRAVIS_BUILD_TYPE=Debug TRAVIS_TESTS_COVERAGE=ON
2016-12-06 00:51:27 +08:00
# Linux GCC-4.6 debug google_double-conversion
- compiler: gcc
env: TRAVIS_BUILD_TYPE=Debug TRAVIS_FLOAT2STR_LIB=google_doubleconversion
2016-12-06 00:51:27 +08:00
# Linux GCC-4.9 release
- compiler: gcc-4.9
addons: *gcc49-packages
env: TRAVIS_BUILD_TYPE=Release TRAVIS_GCC_VERSION=4.9
2016-12-06 00:51:27 +08:00
# OSX Clang debug
- os: osx
compiler: clang
env: TRAVIS_BUILD_TYPE=Debug
2016-12-06 00:51:27 +08:00
# OSX Clang debug google_double-conversion
- os: osx
compiler: clang
env: TRAVIS_BUILD_TYPE=Debug TRAVIS_FLOAT2STR_LIB=google_doubleconversion
2016-12-06 00:51:27 +08:00
# OSX Clang release
- os: osx
compiler: clang
env: TRAVIS_BUILD_TYPE=Release
2015-10-22 00:35:47 +08:00
2015-06-26 00:05:02 +08:00
script:
2017-01-04 19:38:22 +08:00
- chmod +x scripts/travis-build.sh
- ./scripts/travis-build.sh
after_success:
- |
mkdir gcov; cd gcov
list_src_path=(gmio_core gmio_core/internal
gmio_stl gmio_stl/internal
gmio_amf)
basedir_output=../build/src/CMakeFiles/gmio_static.dir
for src_path in ${list_src_path[*]}; do
# Rename file.c.gcno -> file.gcno
for file in $basedir_output/$src_path/*.c.gcno; do
basename_file=`basename $file .c.gcno`
mv $file $basedir_output/$src_path/$basename_file.gcno
done
# Rename file.c.gcda -> file.gcda
for file in $basedir_output/$src_path/*.c.gcda; do
basename_file=`basename $file .c.gcda`
mv $file $basedir_output/$src_path/$basename_file.gcda
done
# Generate *.gcov files
gcov ../src/$src_path/*.c -o $basedir_output/$src_path
done
if [ "$TRAVIS_TESTS_COVERAGE" = "ON" ]; then
bash <(curl -s https://codecov.io/bash) -X gcov -Xcoveragepy -s .
fi