Modify Travis config to add Linux support
This commit is contained in:
parent
7625d338bc
commit
b61ef0f7ca
50
.travis.yml
50
.travis.yml
@ -1,7 +1,45 @@
|
||||
language: cpp
|
||||
dist: trusty
|
||||
sudo: required
|
||||
compiler: clang
|
||||
os: osx
|
||||
osx_image: xcode8.2
|
||||
script: ./ci.sh
|
||||
|
||||
matrix:
|
||||
# Linux / GCC 5.0
|
||||
include:
|
||||
- compiler: g++-5
|
||||
sudo: required
|
||||
dist: trusty
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-5
|
||||
- lua5.2
|
||||
- liblua5.2-dev
|
||||
before_install:
|
||||
- sudo apt-get autoremove lua lua5.1
|
||||
install:
|
||||
- sudo apt-get install -y gdb
|
||||
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 30
|
||||
after_failure:
|
||||
- COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1) # find core file
|
||||
- if [[ -f "$COREFILE" ]]; then gdb -c "$COREFILE" ./tests -ex "thread apply all bt" -ex "set pagination 0" -batch; fi
|
||||
before_script:
|
||||
- ulimit -c unlimited -S
|
||||
script:
|
||||
- mkdir build_dir && cd build_dir
|
||||
- cmake -DLUA_INCLUDE_DIR="/usr/include/lua5.2" -DLUA_LIBRARY="/usr/lib/x86_64-linux-gnu/liblua5.2.so" ..
|
||||
- make -j4 all && make install
|
||||
- ./tests
|
||||
- cd ../lua-tests/ && ./run_tests.lua
|
||||
# Mac OS X / Clang 3.8
|
||||
- compiler: clang
|
||||
os: osx
|
||||
osx_image: xcode8.2
|
||||
before_install:
|
||||
- brew update
|
||||
install:
|
||||
- brew install lua
|
||||
script:
|
||||
- mkdir build_dir && cd build_dir
|
||||
- cmake .. && make -j4 all && make install
|
||||
- ./tests
|
||||
- cd ../lua-tests && ./run_tests.lua
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project(effil)
|
||||
|
||||
find_package(Lua REQUIRED)
|
||||
|
||||
if( "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" LESS "5.2")
|
||||
if (NOT LUA_INCLUDE_DIR OR NOT LUA_LIBRARY)
|
||||
find_package(Lua REQUIRED)
|
||||
if( "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}" LESS "5.2")
|
||||
message(FATAL_ERROR "Wrong Lua version ${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}, use 5.2 or higher")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include_directories(src src/sol/single/sol ${LUA_INCLUDE_DIR})
|
||||
|
||||
16
ci.sh
16
ci.sh
@ -1,16 +0,0 @@
|
||||
#!/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)
|
||||
Loading…
x
Reference in New Issue
Block a user