forked from testspace-samples/cpp.googletest
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
38 lines (33 loc) · 1.59 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
language:
- cpp
env:
global:
- GTEST_ROOT=$TRAVIS_BUILD_DIR/googletest-release-1.11.0/googletest
before_install:
- mkdir -p $HOME/bin
- curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
- testspace config url samples.testspace.com
- testspace -v
- pip install --user gcovr
- curl -fsSL https://github.com/google/googletest/archive/refs/tags/release-1.11.0.tar.gz | tar -zxvf-
- mkdir -p $GTEST_ROOT/build
install:
- pushd $GTEST_ROOT/build
- cmake -DGOOGLETEST_VERSION=1.11.0 -Dgtest_build_samples=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG='-g -fprofile-arcs -ftest-coverage' ../
- make clean gtest
- popd
script:
- make -C $GTEST_ROOT/build |& tee build.log ; test ${PIPESTATUS[0]} -eq 0
- $GTEST_ROOT/build/sample1_unittest --gtest_output=xml:sample1.xml
- $GTEST_ROOT/build/sample2_unittest --gtest_output=xml:sample2.xml
- $GTEST_ROOT/build/sample3_unittest --gtest_output=xml:sample3.xml
- $GTEST_ROOT/build/sample4_unittest --gtest_output=xml:sample4.xml
- $GTEST_ROOT/build/sample5_unittest --gtest_output=xml:sample5.xml
- $GTEST_ROOT/build/sample6_unittest --gtest_output=xml:sample6.xml
- $GTEST_ROOT/build/sample7_unittest --gtest_output=xml:sample7.xml
- $GTEST_ROOT/build/sample8_unittest --gtest_output=xml:sample8.xml
- $GTEST_ROOT/build/sample9_unittest --gtest_output=xml:sample9.xml
- $GTEST_ROOT/build/sample10_unittest --gtest_output=xml:sample10.xml
- gcovr --root ./ --filter ".*/samples/.*" --exclude ".*_unittest.*" -x -o coverage.xml
after_script:
- testspace build.log{lint} [Tests]sample*.xml coverage.xml