Skip to content

Commit

Permalink
Add Travis CI build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oberon00 committed Feb 25, 2017
1 parent 4feb33f commit 60e576e
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
language: cpp
sudo: false
addons:
apt:
packages:
- cmake
- libboost-dev
env:
- C_CXX11=OFF C_LUAV=5.1.5 C_LXX=src
- C_CXX11=ON C_LUAV=5.2.4 C_LXX=src
- C_CXX11=ON C_LUAV=5.2.4 C_LXX=cxx C_EXTRA="-DLUABIND_CPLUSPLUS_LUA=ON"
- C_CXX11=ON C_LUAV=5.3.4 C_LXX=src
compiler:
- gcc
before_install:
- mkdir build; cd build
- $TRAVIS_BUILD_DIR/get-deps.sh $C_LUAV $C_LXX
script:
- LUA_DIR=$PWD/lua-$C_LUAV/$C_LXX/ cmake
-DLUABIND_BUILD_HEADER_TESTS=ON
-DLUABIND_USE_CXX11=$C_CXX11
-DCMAKE_BUILD_TYPE=Debug
$C_EXTRA
..
- make
- CTEST_OUTPUT_ON_FAILURE=1 make test
matrix:
# clang can only be used in C++98 mode with Travis' old boost version.
include:
- compiler: clang
env: C_CXX11=OFF C_LUAV=5.1.5 C_LXX=src
- compiler: clang
env: C_CXX11=OFF C_LUAV=5.3.4 C_LXX=cxx C_EXTRA="-DLUABIND_CPLUSPLUS_LUA=ON"

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Luabind
=======

[![Travis CI build status](https://travis-ci.org/Oberon00/luabind.svg?branch=master)](https://travis-ci.org/Oberon00/luabind)

Luabind is a library that helps you create bindings between C++ and Lua. It
has the ability to expose functions and classes, written in C++, to Lua. It
will also supply the functionality to define classes in lua and let them
Expand Down
20 changes: 20 additions & 0 deletions get-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

set -ex
LUAV="$1"

curl -o lua-$LUAV.tar.gz https://www.lua.org/ftp/lua-$LUAV.tar.gz
tar xzf lua-$LUAV.tar.gz
cd lua-$LUAV
if [ "$2" = "cxx" ]; then
if [ -d cxx ]; then
rm -r cxx
fi
mkdir cxx
make clean
make linux CC=g++ MYCFLAGS="-DLUA_USE_APICHECK -g"
mv src/lua src/luac src/liblua.a cxx/
cp src/lua.h src/luaconf.h src/lauxlib.h src/lualib.h cxx/
fi
make clean
make linux MYCFLAGS="-DLUA_USE_APICHECK -g"

0 comments on commit 60e576e

Please sign in to comment.