This repository has been archived by the owner on Jul 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
54 lines (52 loc) · 1.93 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
sudo: required
language: cpp
compiler:
- gcc
os:
- linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- valgrind
- python-yaml
- gcc-7
- g++-7
- gdb
- cmake3
- cmake3-data
before_script:
- export CC=/usr/bin/gcc-7
- export CXX=/usr/bin/g++-7
- PROJECT_TO_TEST=`basename $TRAVIS_BUILD_DIR`
- cd $HOME
- wget -O boost_1_64_0.tar.gz https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.gz
- tar -xf boost_1_64_0.tar.gz > /dev/null
- BOOST=$HOME/boost_1_64_0
- cd $BOOST
- "./bootstrap.sh"
- "./b2 toolset=gcc-7 --with-program_options --with-filesystem --with-system --with-coroutine --with-context --with-regex --with-date_time --with-atomic --with-test -j4"
- cd $TRAVIS_BUILD_DIR
- gdb --version
- LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BOOST/stage/lib:$TRAVIS_BUILD_DIR
script:
- cmake -DENABLE_COVERAGE:BOOL=TRUE -DBUILD_METAL_TEST_TESTS:BOOL=TRUE -DBUILD_METAL_TEST_EXAMPLES:BOOL=TRUE -DBOOST_ROOT=$BOOST -DCMAKE_BUILD_TYPE=DEBUG .
- make -j4
- cd test
- ctest . --output-on-failure
after_success:
# Copying Coveralls data to a separate folder
- mkdir -p ./coverals
- find . -name *.gcda -exec cp "{}" ./coverals/ \;
- find . -name *.gcno -exec cp "{}" ./coverals/ \;
# Preparing Coveralls data by changind data format to a readable one
- git clone https://github.com/linux-test-project/lcov.git lcov_dir
- GCOV_VERSION="--gcov-tool gcov-7"
- LCOV="$TRAVIS_BUILD_DIR/test/lcov_dir/bin/lcov $GCOV_VERSION --compat-libtool"
- $LCOV --directory ./coverals --base-directory ./ --capture --output-file ./coverals/coverage.info
- $LCOV --remove ./coverals/coverage.info "*boost*" "/usr/*" -o ./coverals/coverage.info
# Sending data to Coveralls
- gem install coveralls-lcov
# https://github.com/okkez/coveralls-lcov/issues/2
- coveralls-lcov --source-encoding=ISO-8859-1 ./coverals/coverage.info