From: Shuanglei Tao Date: Tue, 20 Sep 2016 12:38:12 +0000 (+0800) Subject: travis: test both 1.7.x and 2.0.x version of libwebsockets X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=b31676520c26facd3934079d17058a0201825a32;p=ttyd.git travis: test both 1.7.x and 2.0.x version of libwebsockets --- diff --git a/.travis.yml b/.travis.yml index af258f1..189ef6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,16 +2,27 @@ language: c os: - linux - osx +env: + - LIBWEBSOCKETS_VERSION=v1.7.9 + - LIBWEBSOCKETS_VERSION=v2.0.3 sudo: required dist: trusty +branches: + only: + - master +addons: + apt: + packages: + - cmake + - libjson-c-dev + - libssl-dev install: - echo $TRAVIS_OS_NAME - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -q; sudo apt-get install -y cmake libjson-c-dev libssl-dev; fi - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then pushd /tmp; curl -sLo- https://github.com/warmcat/libwebsockets/archive/v2.0.2.tar.gz | tar xz; cd libwebsockets-2.0.2; cmake .; make && sudo make install; popd; fi - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; brew unlink cmake json-c; brew install cmake openssl json-c libwebsockets; fi + - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; brew unlink cmake json-c; brew install cmake openssl json-c; fi + - echo "Compiling libwebsockets-$LIBWEBSOCKETS_VERSION from source..." + - pushd /tmp; curl -sLo- https://github.com/warmcat/libwebsockets/archive/$LIBWEBSOCKETS_VERSION.tar.gz | tar xz; cd libwebsockets-*; cmake .; make && sudo make install; popd script: - echo $TRAVIS_OS_NAME - cmake --version - mkdir build && cd build - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then cmake .. && make; fi - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl .. && make; fi \ No newline at end of file + - if [ "$TRAVIS_OS_NAME" == "osx" ]; then cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl .. && make; else cmake .. && make; fi diff --git a/src/server.h b/src/server.h index dd29ed4..a71264a 100644 --- a/src/server.h +++ b/src/server.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include