forked from Castaglia/proftpd-mod_proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (63 loc) · 2.56 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
language: c
compiler:
- gcc
- clang
install:
- sudo apt-get update -qq
# for unit tests
- sudo apt-get install -y check
# for Redis support
- sudo apt-get install -y libhiredis-dev
# for OpenSSL support
- sudo apt-get install -y libssl-dev
# for mod_sql_sqlite
- sudo apt-get install -y libsqlite3-dev sqlite3
# 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
# For reference
- sqlite3 --version
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 10 https://github.com/proftpd/proftpd.git
- mkdir -p proftpd/contrib/mod_proxy/
- cp -R include/ proftpd/contrib/mod_proxy/include
- cp -R lib/ proftpd/contrib/mod_proxy/lib/
- cp -R t/ proftpd/contrib/mod_proxy/t/
- cp mod_proxy.* proftpd/contrib/mod_proxy/
- cp Makefile.in proftpd/contrib/mod_proxy/
- cp config* proftpd/contrib/mod_proxy/
- cp install-sh proftpd/contrib/mod_proxy/
- cd proftpd
# First, a build without mod_tls and without Redis
- ./configure LIBS='-lm -lrt -pthread' --enable-devel=coverage --enable-tests --with-module=mod_proxy
- make
# Next, a build with Redis, without mod_tls
- ./configure LIBS='-lm -lrt -pthread' --enable-devel=coverage --enable-redis --enable-tests --with-module=mod_proxy
- make
# Next, a build WITH mod_tls (as a shared module)
- make clean
- ./configure LIBS='-lm -lrt -pthread' --enable-devel=coverage --enable-dso --enable-redis --enable-tests --with-shared=mod_tls:mod_proxy
- make
# Last, a build with mod_tls (as a static module), and run the tests
- make clean
- ./configure LIBS='-lm -lrt -pthread' --enable-devel=coverage --enable-redis --enable-tests --with-modules=mod_tls:mod_proxy
- make
- cd contrib/mod_proxy && make TEST_VERBOSE=1 check && cd ../../
# Run `tidy -e -q mod_proxy.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_proxy --directory proftpd/contrib/mod_proxy --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