File: .travis.yml

package info (click to toggle)
proftpd-mod-statsd 0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 504 kB
  • sloc: sh: 3,020; ansic: 1,546; perl: 1,061; makefile: 108
file content (50 lines) | stat: -rw-r--r-- 1,760 bytes parent folder | download
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
language: c

compiler:
  - gcc
  - clang

install:
  - sudo apt-get update -qq
  # for unit tests
  - sudo apt-get install -y check
  # for static code analysis
  - sudo apt-get install -y cppcheck rats
  # for test code coverage
  - sudo apt-get install -y lcov
  - gem install coveralls-lcov

before_script:
  - cd ${TRAVIS_BUILD_DIR}
  - lcov --directory . --zerocounters

script:
  # - find . -type f -name "*.c" -print | grep -v t\/ | xargs cppcheck 2>&1
  # - find . -type f -name "*.c" -print | grep -v t\/ | xargs rats --language=c
  - git clone --depth 50 https://github.com/proftpd/proftpd.git
  - mkdir -p proftpd/contrib/mod_statsd/
  - cp *.[ch] proftpd/contrib/mod_statsd/
  - cp mod_statsd.* proftpd/contrib/mod_statsd/
  - cp Makefile.in proftpd/contrib/mod_statsd/
  - cp config* proftpd/contrib/mod_statsd/
  - cp install-sh proftpd/contrib/mod_statsd/
  - cp -R t/ proftpd/contrib/mod_statsd/t/
  - cd proftpd
  - ./configure --enable-devel=coverage --enable-dso --enable-tests --with-shared=mod_statsd
  - make
  - make clean
  - ./configure --enable-devel=coverage --enable-tests --with-modules=mod_statsd
  - make
  - cd contrib/mod_statsd && make TEST_VERBOSE=1 check && cd ../../
  # Run `tidy -e -q mod_statsd.html` for doc validation

after_success:
  - cd ${TRAVIS_BUILD_DIR}
  # capture the test coverage info
  - lcov --ignore-errors gcov,source --base-directory ${TRAVIS_BUILD_DIR}/proftpd/contrib/mod_statsd --directory proftpd/contrib/mod_statsd --capture --output-file coverage.info
  # filter out system and test code
  - lcov --remove coverage.info 'api/*' 't/*' '/usr/*' --output-file coverage.info
  # debug before upload
  - lcov --list coverage.info
  # upload coverage info to coveralls
  - coveralls-lcov coverage.info