forked from cinemast/libjson-rpc-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
32 lines (28 loc) · 1.26 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
language: cpp
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libcurl4-openssl-dev libjsoncpp-dev libargtable2-dev libboost-test-dev libgnutls-dev libgcrypt11-dev valgrind wget
- wget ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.38.tar.gz
- tar -xvf libmicrohttpd-0.9.38.tar.gz
- cd libmicrohttpd-0.9.38
- ./configure && make
- sudo make install && sudo ldconfig
- cd .. && sudo rm -rf libmicrohttpd-0.9.38
- sudo pip install cpp-coveralls
env:
- HTTP_SERVER=YES HTTP_CLIENT=YES COMPILE_STUBGEN=YES
compiler:
- gcc
script:
- mkdir -p build && cd build
- cmake -DCMAKE_BUILD_TYPE=Debug -DHTTP_CLIENT=${HTTP_CLIENT} -DHTTP_SERVER=${HTTP_SERVER} -DCOMPILE_STUBGEN=${COMPILE_STUBGEN} ..
- make
- valgrind --leak-check=full --error-exitcode=1 ./bin/unit_testsuite
- make test
- sudo make install && sudo ldconfig
- g++ ../src/examples/simpleclient.cpp -ljsonrpccpp-client -ljsoncpp -ljsonrpccpp-common -lcurl -o sampleclient
- g++ ../src/examples/simpleserver.cpp -ljsonrpccpp-server -ljsoncpp -ljsonrpccpp-common -lmicrohttpd -o sampleserver
- sudo make uninstall
after_success:
- cd ..
- coveralls -e src/test -e src/examples -e cmake -e /usr/include -e build/CMakeFiles -E '.*\.h' -E 'libmicrohttpd.*'