From: Shuanglei Tao Date: Wed, 14 Sep 2016 00:53:49 +0000 (+0800) Subject: Add .travis.yml X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=5a953a9680d7333ea47e63fa3f7b037a2ad43c5d;p=ttyd.git Add .travis.yml --- diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..af258f1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: c +os: + - linux + - osx +sudo: required +dist: trusty +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 +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 diff --git a/CMakeLists.txt b/CMakeLists.txt index d06092a..1b1721f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,6 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.2) +set(CMAKE_C_STANDARD 99) + project(ttyd) set(SOURCE_FILES server.c http.c protocol.c) diff --git a/README.md b/README.md index 0ef7f2b..462ac25 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ttyd - terminal emulator for the web +# ttyd - terminal emulator for the web [![Build Status](https://travis-ci.org/tsl0922/ttyd.svg?branch=master)](https://travis-ci.org/tsl0922/ttyd) ttyd is a simple command line tool for sharing terminal over the web, inspired by [GoTTY](https://github.com/yudai/gotty).