Merge pull request #36 from loud-hound/iudalov/all-build-types

Add ci/test_all.sh
This commit is contained in:
Ilia 2017-04-04 15:18:18 +03:00 committed by GitHub
commit 2d61d1d9df
2 changed files with 12 additions and 12 deletions

View File

@ -1,7 +1,6 @@
language: cpp language: cpp
matrix: matrix:
# Linux / GCC 5.0
include: include:
- compiler: g++-5 - compiler: g++-5
sudo: required sudo: required
@ -25,21 +24,14 @@ matrix:
before_script: before_script:
- ulimit -c unlimited -S - ulimit -c unlimited -S
script: script:
- mkdir build_dir && cd build_dir - ci/test_all.sh -DLUA_INCLUDE_DIR="/usr/include/lua5.2" -DLUA_LIBRARY="/usr/lib/x86_64-linux-gnu/liblua5.2.so"
- cmake -DCMAKE_BUILD_TYPE=Debug -DLUA_INCLUDE_DIR="/usr/include/lua5.2" -DLUA_LIBRARY="/usr/lib/x86_64-linux-gnu/liblua5.2.so" ..
- make -j4 all && make install
- ./tests
- ./run_tests.lua
# Mac OS X / Clang 3.8
- compiler: clang - compiler: clang
os: osx os: osx
osx_image: xcode8.2 osx_image: xcode8.3
before_install: before_install:
- brew update - brew update
install: install:
- brew install lua - brew install lua
script: script:
- mkdir build_dir && cd build_dir - ci/test_all.sh
- cmake -DCMAKE_BUILD_TYPE=Debug .. && make -j4 all && make install
- ./tests
- ./run_tests.lua

8
ci/test_all.sh Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
for build_type in debug release; do
mkdir -p $build_type
(cd $build_type && cmake -DCMAKE_BUILD_TYPE=$build_type $@ .. && make -j4 install)
(cd $build_type && ./tests && lua run_tests.lua)
done