-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
48 lines (45 loc) · 1.48 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
sudo: required
dist: bionic
language: c
compiler:
- gcc
install:
- cd ${TRAVIS_BUILD_DIR}
- sudo apt-get update -qq
- sudo apt-get install software-properties-common
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update
- sudo apt-get install gcc-6
- sudo apt-get install libjansson-dev
- sudo apt-get install -y -qq valgrind
- wget https://cmocka.org/files/1.1/cmocka-1.1.0.tar.xz
- tar -xvf cmocka-1.1.0.tar.xz
- cd cmocka-1.1.0
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
- make
- sudo make install
- cd ${TRAVIS_BUILD_DIR}
- wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz
- tar xf lcov_1.11.orig.tar.gz
- sudo make -C lcov-1.11/ install
- gem install coveralls-lcov
- cd ${TRAVIS_BUILD_DIR}
- wget https://github.com/fredrikwidlund/libdynamic/releases/download/v2.3.0/libdynamic-2.3.0.tar.gz
- tar -xvf libdynamic-2.3.0.tar.gz
- cd libdynamic-2.3.0
- ./configure
- sudo make install
branches:
only:
- master
script:
- cd ${TRAVIS_BUILD_DIR}
- ./autogen.sh && ./configure && make check
after_success:
- cd ${TRAVIS_BUILD_DIR}
- lcov --directory . --capture --output-file coverage.info # capture coverage info
- lcov --remove coverage.info 'src/picohttpparser/*' 'test/*' '/usr/*' --output-file coverage.info # filter out system and test code
- lcov --list coverage.info
- coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info