forked from jimmiebergmann/mini-yaml
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
53 lines (44 loc) · 1.21 KB
/
Copy path.travis.yml
File metadata and controls
53 lines (44 loc) · 1.21 KB
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
language:
- cpp
compiler:
- gcc
- clang
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- valgrind
- lcov
before_install:
# C++11, C++14, even C++17...
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
install:
# C++11
- sudo apt-get install -qq gcc-6 g++-6
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 90
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90
- sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-6 90
script:
# Checks
- g++ --version
- gcc --version
- gcov --version
# Build
- mkdir build
- cd build
- cmake -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug ..
- cmake --build . --config Debug
# Run test
- cd ../bin
- valgrind --leak-check=full --track-origins=yes --error-exitcode=1 ./mini_yaml_test
- cd ../build
after_success:
- lcov --directory ./CMakeFiles/mini_yaml_test.dir --capture --output-file coverage.info
- lcov --extract coverage.info '*/yaml.hpp' '*/yaml.cpp' --output-file coverage.info
- lcov --list coverage.info
- bash <(curl -s https://codecov.io/bash)
notifications:
email: false