.travis.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. language: cpp
  2. before_install:
  3. - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  4. - sudo apt-get update -qq
  5. - sudo apt-get install -qq libcurl4-openssl-dev libjsoncpp-dev libargtable2-dev libgnutls-dev libgcrypt11-dev valgrind wget gcc-4.8 g++-4.8
  6. - wget http://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.44.tar.gz
  7. - tar -xvf libmicrohttpd-0.9.44.tar.gz
  8. - cd libmicrohttpd-0.9.44
  9. - ./configure && make
  10. - sudo make install && sudo ldconfig
  11. - cd .. && sudo rm -rf libmicrohttpd-0.9.44
  12. - sudo pip install cpp-coveralls
  13. - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  14. - sudo apt-get update -qq
  15. - if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.8; fi
  16. - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
  17. install:
  18. - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
  19. env:
  20. - HTTP_SERVER=YES HTTP_CLIENT=YES COMPILE_STUBGEN=YES
  21. compiler:
  22. - gcc
  23. script:
  24. - mkdir -p build && cd build
  25. - cmake -DCMAKE_BUILD_TYPE=Debug -DHTTP_CLIENT=${HTTP_CLIENT} -DHTTP_SERVER=${HTTP_SERVER} -DCOMPILE_STUBGEN=${COMPILE_STUBGEN} ..
  26. - make
  27. - make test
  28. - sudo make install && sudo ldconfig
  29. - g++ ../src/examples/simpleclient.cpp -ljsonrpccpp-client -ljsoncpp -ljsonrpccpp-common -lcurl -o sampleclient
  30. - g++ ../src/examples/simpleserver.cpp -ljsonrpccpp-server -ljsoncpp -ljsonrpccpp-common -lmicrohttpd -o sampleserver
  31. - sudo make uninstall
  32. after_success:
  33. - cd ..
  34. - coveralls -e src/test -e src/examples -e cmake -e /usr/include -e build/CMakeFiles -E '.*\.h' -E 'libmicrohttpd.*'