forked from proftpd/proftpd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
99 lines (92 loc) · 5.02 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
env:
- PACKAGE_VERSION=1.3.7rc1
language: c
compiler:
- gcc
- clang
services:
- docker
- redis-server
install:
# Need to add other repos for e.g. libsodium
- sudo add-apt-repository -y ppa:jbboehr/ppa
- sudo add-apt-repository -y ppa:chris-lea/libsodium
- echo "deb http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" | sudo tee -a /etc/apt/sources.list > /dev/null
- echo "deb-src http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" | sudo tee -a /etc/apt/sources.list > /dev/null
- sudo apt-get update -qq
# for unit tests
- sudo apt-get install -y check
# for mod_lang
- sudo apt-get install -y gettext
# for xattr support
- sudo apt-get install -y libattr1-dev
# for mod_cap
- sudo apt-get install -y libcap-dev
# for mod_geoip
- sudo apt-get install -y libgeoip-dev
# for mod_ldap
- sudo apt-get install -y libldap2-dev libsasl2-dev
# for memcache support
- sudo apt-get install -y libmemcached-dev
# for redis support
- sudo apt-get install -y libhiredis-dev
# for mod_sql_mysql
- sudo apt-get install -y libmysqlclient-dev
# for PAM support
- sudo apt-get install -y libpam-dev
# for mod_sql_postgres
- sudo apt-get install -y libpq-dev
# for mod_sql_odbc
- sudo apt-get install -y unixodbc-dev
# for OpenSSL support
- sudo apt-get install -y libssl-dev
# for Sodium support
- sudo apt-get install -y --force-yes libsodium-dev
# for mod_sql_sqlite
- sudo apt-get install -y libsqlite3-dev sqlite3
# for mod_wrap
- sudo apt-get install -y libwrap0-dev
# for PCRE support
- sudo apt-get install -y libpcre3-dev
# for zlib support
- sudo apt-get install -y zlib1g-dev
# for static code analysis
- sudo apt-get install -y cppcheck rats
# for integration/regression test
- sudo apt-get install -y libtest-unit-perl
- sudo apt-get install -y libwww-perl libnet-telnet-perl
- sudo apt-get install -y libssh2-1-dev libnet-ssh2-perl
# for test code coverage
- sudo apt-get install -y lcov
- gem install coveralls-lcov
# for HTML validation
- sudo apt-get install -y tidy
before_script:
- cd ${TRAVIS_BUILD_DIR}
- lcov --directory . --zerocounters
script:
# - find . -type f -name "*.c" -print | grep -v tests | xargs cppcheck 2>&1
# - find . -type f -name "*.c" -print | grep -v tests | xargs rats --language=c
- ./configure LIBS="-lodbc -lm -lrt -pthread" --enable-devel=coverage --enable-ctrls --enable-facl --enable-memcache --enable-nls --enable-pcre --enable-redis --enable-tests --with-modules=mod_sql:mod_sql_mysql:mod_sql_odbc:mod_sql_postgres:mod_sql_sqlite:mod_sql_passwd:mod_sftp:mod_sftp_sql:mod_sftp_pam:mod_tls:mod_tls_fscache:mod_tls_shmcache:mod_tls_memcache:mod_tls_redis:mod_ban:mod_copy:mod_ctrls_admin:mod_deflate:mod_dnsbl:mod_dynmasq:mod_exec:mod_facl:mod_geoip:mod_ifversion:mod_ldap:mod_load:mod_log_forensic:mod_qos:mod_quotatab:mod_quotatab_file:mod_quotatab_ldap:mod_quotatab_radius:mod_quotatab_sql:mod_radius:mod_readme:mod_rewrite:mod_shaper:mod_site_misc:mod_snmp:mod_wrap:mod_wrap2:mod_wrap2_file:mod_wrap2_redis:mod_wrap2_sql:mod_digest:mod_auth_otp:mod_statcache:mod_unique_id:mod_ifsession
- make
- make TEST_VERBOSE=1 check-api
- make clean
- ./configure LIBS="-lodbc -lm -lrt -pthread" --enable-devel --enable-ctrls --enable-dso --enable-facl --enable-memcache --enable-nls --enable-pcre --enable-tests --with-shared=mod_sql:mod_sql_mysql:mod_sql_odbc:mod_sql_postgres:mod_sql_sqlite:mod_sql_passwd:mod_sftp:mod_sftp_sql:mod_sftp_pam:mod_tls:mod_tls_fscache:mod_tls_shmcache:mod_tls_memcache:mod_ban:mod_copy:mod_ctrls_admin:mod_deflate:mod_dnsbl:mod_dynmasq:mod_exec:mod_facl:mod_geoip:mod_ifversion:mod_ldap:mod_load:mod_log_forensic:mod_qos:mod_quotatab:mod_quotatab_file:mod_quotatab_ldap:mod_quotatab_radius:mod_quotatab_sql:mod_radius:mod_readme:mod_rewrite:mod_shaper:mod_site_misc:mod_snmp:mod_wrap:mod_wrap2:mod_wrap2_file:mod_wrap2_redis:mod_wrap2_sql:mod_digest:mod_auth_otp:mod_statcache:mod_unique_id:mod_ifsession
- make
- if [ "${CC}" != "clang" ]; then sudo make install; fi
# NOTE: Temporarily commented out until the EPEL metalink issues (stale
# epel-release-7-10.noarch.rpm with regard to EPEL mirror updates on
# 2017-10-08) are sorted.
# - (cd contrib/dist/travis && sudo docker run -e PACKAGE_VERSION=${PACKAGE_VERSION} -e TRAVIS_BRANCH=${TRAVIS_BRANCH} -v `pwd`:`pwd` -w `pwd` centos:centos7 /bin/bash `pwd`/docker-rpmbuild.sh)
after_success:
- cd ${TRAVIS_BUILD_DIR}
# capture the test coverage info
- lcov --ignore-errors gcov,source --directory . --capture --output-file coverage.info
# filter out system and test code
- lcov --remove coverage.info 'lib/glibc-glob.*' 'lib/ccan-json.*' 'lib/hanson-tpl.*' 'lib/pr_fnmatch_loop.*' 'tests/*' '/usr/*' --output-file coverage.info
# debug before upload
- lcov --list coverage.info
# upload coverage info to coveralls
- coveralls-lcov coverage.info
# Run some validation on the docs
- for f in `/bin/ls doc/contrib/*.html doc/howto/*.html doc/modules/*.html doc/utils/*.html`; do echo "Processing $f"; tidy -errors -omit -q $f; done