forked from lsof-org/lsof
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (62 loc) · 1.49 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
#
# Derived from
# https://github.com/steveno/ctags/blob/master/.travis.yml
#
dist: xenial
language: c
os:
- linux
- osx
compiler:
- gcc
- clang
sudo: true
addons:
apt:
packages:
- lcov
- procps
- netcat
before_install:
- |
gem install lcoveralls
script:
- |
case $TRAVIS_OS_NAME in
linux) dialect=linux;;
osx) dialect=darwin;;
esac
./Configure -n $dialect
- |
if [ $CC = 'gcc' ]; then
CC_EXTRA="--coverage"
fi
make CDEF="${CC_EXTRA}" CC="${CC} ${CC_EXTRA}"
- |
case $TRAVIS_OS_NAME in
linux) dialect=linux;;
osx) dialect=darwin;;
esac
tdir=dialects/${dialect}/tests
if [ -f ${tdir}/Makefile ]; then
make -C "${tdir}"
fi
- |
case $TRAVIS_OS_NAME in
linux) dialect=linux;;
osx) dialect=darwin;;
esac
sudo -E bash ./check.bash $dialect
after_success:
- |
if [ $CC = 'gcc' ] && [ $TRAVIS_OS_NAME = 'linux' ]; then
(
for f in /home/travis/.rvm/gems/ruby-2*/gems/lcoveralls-*/lib/lcoveralls/color_formatter.rb; do
sed -i -e 's/severity.capitalize!/severity = severity.capitalize/' $f
done
for f in /home/travis/.rvm/gems/ruby-2*/gems/lcoveralls-*/lib/lcoveralls/runner.rb; do
sed -i -e 's/\(.*format.*f\)\(%\)\('"'"'.*$\)/\1%%\3/' $f
done
) || :
lcov -c -b . -d . -o coverage.info && lcoveralls --root . --retry-count 5 coverage.info
fi