]> prime8.dev >> repos - ttyd.git/commitdiff
Add .travis.yml
authorShuanglei Tao <tsl0922@gmail.com>
Wed, 14 Sep 2016 00:53:49 +0000 (08:53 +0800)
committerShuanglei Tao <tsl0922@gmail.com>
Wed, 14 Sep 2016 00:53:49 +0000 (08:53 +0800)
.travis.yml [new file with mode: 0644]
CMakeLists.txt
README.md

diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..af258f1
--- /dev/null
@@ -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
index d06092af5402207eee8e29748defd99725678eeb..1b1721f7110947d6ad842746a40663cf39b94138 100644 (file)
@@ -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)
index 0ef7f2b510fe5532539165434019f68698cf2b4c..462ac25e802b06e07facf8655dfe644e07bcb358 100644 (file)
--- 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).