forked from cinemast/libjson-rpc-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (35 loc) · 1.48 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
language: cpp
before_install:
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update -qq
- sudo apt-get install -qq libcurl4-openssl-dev libjsoncpp-dev libargtable2-dev libgnutls-dev libgcrypt11-dev valgrind wget gcc-5 g++-5
- wget http://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.52.tar.gz
- tar -xvf libmicrohttpd-0.9.52.tar.gz
- cd libmicrohttpd-0.9.52
- ./configure && make
- sudo make install && sudo ldconfig
- cd .. && sudo rm -rf libmicrohttpd-0.9.52
- sudo pip install codecov
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update -qq
- if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi
install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi
- sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-5 90
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
- 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
- cd ..
- ./dev/codecov.sh
after_success:
- bash <(curl -s https://codecov.io/bash)