forked from dlundquist/sniproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
27 lines (27 loc) · 1.08 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
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_0.1-1_`dpkg --print-architecture`.deb
- sudo perl -pi -e 's/ENABLED=0/ENABLED=1/' /etc/default/sniproxy
- echo -e "pidfile /tmp/sniproxy.pid\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 /tmp/sniproxy.pid && ps -up `cat /tmp/sniproxy.pid`