-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
121 lines (108 loc) · 3.69 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
language: c
sudo: false
env:
global:
- ACLOCAL_PATH=$HOME/share/aclocal${ACLOCAL_PATH+:}$ACLOCAL_PATH
- PKG_CONFIG_PATH=$HOME/lib/pkgconfig${PKG_CONFIG_PATH+:}$PKG_CONFIG_PATH
- LD_LIBRARY_PATH=$HOME/lib${LD_LIBRARY_PATH+:}$LD_LIBRARY_PATH
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "mQ/mVTXPZC4oQDvTHnW9acs4kZM0YSQj9M1AW3WNZvyP6v97rThrb71KmDQMuzVC4/ez0SmGmaM86pVpynIImqm/bsgxaBbX/8lMIxhO7Zieubi4Bp7d5zRX8FmonS/8CqXceO5AOCqMQT/jJFDBCz7tqKdYwlYuT0fxgB+rIDQDWPg1oa77sB0grS1yqZ9RBbk2rtgx76zbs97YLgtuvPMvqHtumUd4GPO5rR/rCuulIARmJTYQhU6corGbsfcuQ+yEd2P8RLExGwvldRuBVo2Bm3Vrx1w0ngNfyQbWW2GfL3SuVu+T/K4GpShMKph+1SRrW9ybVOzVGvXKpyOtU/pRmDTsYjPUR20QbR3gFz0OkIG/EGt4+0MEMCAuDe10CmaGDeoVtdkjUVQgVHwmY3grl+lfPGGAVG0skH/v6hFMMCZY7sViHu65fXM3S/WSyIeX+LwgtFCoAxbi80kXT7O74BEYF2OgNJevpgIgEZVAbCcOqYbEkVUYxLEbhmZ3o56zbEk52J9xHWgTCjKywzqTGzL74VrwzGyYnJ8AVO4c923p/gq7X8rNVc1gFX+CPBzpXlcnwgBlyztHuL12kjHz4CAqKothkzTx9UEAuycf+t5KqZAuozJwp7ov8SoBo9jiKds53v4dMGCmGTv7asTAevOL1ApLDTPjov+1Ubc="
matrix:
fast_finish: true
include:
- os: linux
compiler: gcc
env: BUILD_TYPE=coverage
addons:
apt:
packages:
- lcov
- autoconf-archive
- texinfo # test system
- os: linux
compiler: clang
- os: osx
compiler: gcc
- os: osx
compiler: clang
addons:
apt:
packages:
- autoconf-archive
- texinfo # test system
coverity_scan:
project:
name: "staticfox/foxbot"
description: "An IRC bot written in C"
notification_email: [email protected]
build_command_prepend: "autoreconf -fvi; ./configure; make clean"
build_command: "make"
branch_pattern: coverity_scan
install:
- if [ "$TRAVIS_OS_NAME" = osx ]; then
curl -fLSs http://ftpmirror.gnu.org/autoconf-archive/autoconf-archive-2016.03.20.tar.xz | tar xJ &&
(
cd autoconf-archive-* &&
./configure --prefix="$HOME" &&
make install;
);
fi
# test system
- curl -fLSs https://github.com/libcheck/check/files/71408/check-0.10.0.tar.gz | tar xz &&
(
cd check-* &&
./configure --prefix="$HOME" &&
make install;
) &&
rm -rf check-*
- curl -fLSs http://ftp.gnu.org/gnu/automake/automake-1.14.tar.xz | tar xJ &&
mkdir -p build-aux &&
cp automake-*/lib/tap-driver.sh build-aux &&
rm -rf automake-*
- if [ "$BUILD_TYPE" = coverage ]; then
gem install coveralls-lcov;
fi
before_install:
- if [ "$TRAVIS_OS_NAME" = osx ]; then
brew update;
brew uninstall libtool;
brew install libtool;
fi
before_script:
# must set these flags after installation to avoid running coverage on
# other dependencies like libcheck
- if [ "$BUILD_TYPE" = coverage ]; then
export CFLAGS="$CFLAGS --coverage"
CPPFLAGS="$CPPFLAGS -DCOVERAGE"
LDFLAGS="$LDFLAGS --coverage";
fi
after_success:
- if [ "$BUILD_TYPE" = coverage ]; then
lcov -c -o coverage.info -d src &&
lcov -r coverage.info -o coverage.info
src/config_lexer.c
src/error.h
src/error.c
src/config_lexer.l
src/config_parser.c
&&
lcov -l coverage.info &&
coveralls-lcov coverage.info;
else
echo "No coverage for this build";
fi
after_failure:
- if [ -f tests/test-suite.log ]; then
cat tests/test-suite.log;
else
echo "Could not make it to check system";
echo "Working dir (`pwd`)";
ls -lahtr;
fi
script:
- autoreconf -fvi
- CFLAGS="$CFLAGS -Werror" ./configure --prefix="$HOME/travis_build"
- make clean
- make
- make check