Continuous integration with travis-ci

This commit is contained in:
Ilia Udalov 2017-01-22 01:33:35 +03:00
parent 5407a33947
commit 0a498177ee
5 changed files with 29 additions and 4 deletions

7
.travis.yml Normal file
View File

@ -0,0 +1,7 @@
language: cpp
dist: trusty
sudo: required
compiler: clang
os: osx
osx_image: xcode8.2
script: ./ci.sh

View File

@ -22,7 +22,7 @@ add_library(woofer SHARED ${SOURCES})
target_link_libraries(woofer -lpthread ${LUA_LIBRARY}) target_link_libraries(woofer -lpthread ${LUA_LIBRARY})
set(GENERAL "-std=c++14 -pthread") set(GENERAL "-std=c++14 -pthread")
set(ENABLE_WARNINGS "-Wall -Wextra -pedantic") set(ENABLE_WARNINGS "-Wall -Wextra -pedantic -Werror")
set(BUILD_FLAVOR "-O3 -UNDEBUG") set(BUILD_FLAVOR "-O3 -UNDEBUG")
set_target_properties(woofer PROPERTIES COMPILE_FLAGS "${ENABLE_WARNINGS} ${GENERAL} ${BUILD_FLAVOR}") set_target_properties(woofer PROPERTIES COMPILE_FLAGS "${ENABLE_WARNINGS} ${GENERAL} ${BUILD_FLAVOR}")

View File

@ -1,2 +1,4 @@
# Bevy # Woofer
Pure threads for Lua Threading library for Lua. Written in C++ with great help of [sol2](https://github.com/ThePhD/sol2).
[![Build Status](https://travis-ci.org/loud-hound/woofer.svg?branch=master)](https://travis-ci.org/loud-hound/woofer)

16
ci.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh -e
brew update && true
brew install lua cmake && true
ROOT_DIR=$( cd $(dirname $0); pwd )
WORK_DIR=$ROOT_DIR/build
mkdir -p $WORK_DIR
# build
(cd $WORK_DIR && cmake $ROOT_DIR && make -j4 all && make install)
# run tests
(cd $WORK_DIR && ./tests)
(cd $ROOT_DIR/lua-tests && ./run_tests.lua)

View File

@ -1,4 +1,4 @@
#!/usr/bin/lua #!/usr/bin/env lua
package.cpath = package.cpath .. ";../build/?.so;;../build/?.dylib" package.cpath = package.cpath .. ";../build/?.so;;../build/?.dylib"
test = require "luaunit.luaunit" test = require "luaunit.luaunit"