forked from fabi125-zz/sniproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
29 lines (29 loc) · 1.22 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
language: c
compiler:
- clang
- gcc
install:
- sudo apt-get update
- DEBIAN_FRONTEND=noninteractive sudo apt-get install -y libev-dev libpcre3-dev cdbs dh-autoreconf valgrind apache2-utils rpm
- mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
- ./autogen.sh
script:
- echo "Running unit tests"
- ./configure
- make all
- make check
- echo "Checking for memory leaks"
- bash -c "cd tests && ./functional_test valgrind --error-exitcode=1"
- echo "Testing Debian package build"
- dpkg-buildpackage
- echo "Testing RPM package build"
- make dist
- rpmbuild --define "_sourcedir `pwd`" -ba --nodeps redhat/sniproxy.spec
- echo "Testing Debian package installation, configuration, and usage"
- sudo dpkg -i ../sniproxy_*_`dpkg --print-architecture`.deb
- sudo perl -pi -e 's/ENABLED=0/ENABLED=1/' /etc/default/sniproxy
- echo -e "user daemon\n\npidfile /var/run/sniproxy.pid\n\nerror_log {\n syslog daemon\n priority notice\n}\n\nlisten 80 {\n proto http\n}\n\ntable {\n localhost *\n}" | sudo tee /etc/sniproxy.conf
- sudo service sniproxy start
- sleep 1; test -e /var/run/sniproxy.pid && ps -up `cat /var/run/sniproxy.pid`
- sudo service sniproxy stop
- sudo apt-get remove sniproxy