From 20e748fc7766fcbaa87ba33bdf9c7c43c955258b Mon Sep 17 00:00:00 2001 From: Ilia Udalov Date: Tue, 4 Apr 2017 01:51:16 +0300 Subject: [PATCH 1/2] Add ci/test_all.sh --- .travis.yml | 16 ++++------------ ci/test_all.sh | 8 ++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) create mode 100755 ci/test_all.sh diff --git a/.travis.yml b/.travis.yml index 4bf2146..99f720a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: cpp matrix: - # Linux / GCC 5.0 include: - compiler: g++-5 sudo: required @@ -25,21 +24,14 @@ matrix: before_script: - ulimit -c unlimited -S script: - - mkdir build_dir && cd build_dir - - 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 + - ci/test.sh -DLUA_INCLUDE_DIR="/usr/include/lua5.2" -DLUA_LIBRARY="/usr/lib/x86_64-linux-gnu/liblua5.2.so" + - compiler: clang os: osx - osx_image: xcode8.2 + osx_image: xcode8.3 before_install: - brew update install: - brew install lua script: - - mkdir build_dir && cd build_dir - - cmake -DCMAKE_BUILD_TYPE=Debug .. && make -j4 all && make install - - ./tests - - ./run_tests.lua + - ci/test.sh diff --git a/ci/test_all.sh b/ci/test_all.sh new file mode 100755 index 0000000..49a63f5 --- /dev/null +++ b/ci/test_all.sh @@ -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 From 907b93977b8377310948a066ab2b9bdfbed07ce9 Mon Sep 17 00:00:00 2001 From: Ilia Udalov Date: Tue, 4 Apr 2017 01:53:49 +0300 Subject: [PATCH 2/2] test.sh -> test_all.sh --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 99f720a..d7cc8ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ matrix: before_script: - ulimit -c unlimited -S script: - - ci/test.sh -DLUA_INCLUDE_DIR="/usr/include/lua5.2" -DLUA_LIBRARY="/usr/lib/x86_64-linux-gnu/liblua5.2.so" + - ci/test_all.sh -DLUA_INCLUDE_DIR="/usr/include/lua5.2" -DLUA_LIBRARY="/usr/lib/x86_64-linux-gnu/liblua5.2.so" - compiler: clang os: osx @@ -34,4 +34,4 @@ matrix: install: - brew install lua script: - - ci/test.sh + - ci/test_all.sh