From d65d30b219989f395335ae8bc403429d92f4a861 Mon Sep 17 00:00:00 2001
From: Sulverus <sulverus@gmail.com>
Date: Thu, 15 Oct 2015 14:29:15 +0300
Subject: [PATCH] travis config updated with multios builds(linux and os x)

---
 .travis.yml                 | 19 +++++++------------
 extra/travis/build_linux.sh |  6 ++++++
 extra/travis/build_osx.sh   |  4 ++++
 extra/travis/test_linux.sh  |  1 +
 extra/travis/test_osx.sh    |  1 +
 5 files changed, 19 insertions(+), 12 deletions(-)
 create mode 100755 extra/travis/build_linux.sh
 create mode 100755 extra/travis/build_osx.sh
 create mode 100755 extra/travis/test_linux.sh
 create mode 100755 extra/travis/test_osx.sh

diff --git a/.travis.yml b/.travis.yml
index 8caa589f40..2060105f52 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,9 @@
 language: cpp
+
+os:
+  - linux
+  - osx
+
 compiler:
   - clang
   - gcc
@@ -10,24 +15,14 @@ before_install:
   - git submodule update --init --recursive
 
 before_script:
-  - psql -c "CREATE USER tarantool WITH PASSWORD 'tarantool';" -U postgres
-  - psql -c "CREATE DATABASE tarantool;" -U postgres
-  - psql -c "GRANT ALL PRIVILEGES ON DATABASE tarantool TO tarantool;" -U postgres
-  - mysql -e "CREATE USER 'tarantool'@'localhost' IDENTIFIED BY 'tarantool';" -u root
-  - mysql -e "CREATE DATABASE tarantool;" -u root
-  - mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'tarantool'@'localhost' WITH GRANT OPTION;" -u root
   - export PG='127.0.0.1:5432:tarantool:tarantool:tarantool'
   - export MYSQL='127.0.0.1:3306:tarantool:tarantool:tarantool'
 
 install:
-  - sudo apt-get update > /dev/null
-  - sudo apt-get -q install binutils-dev python-daemon python-yaml
-  - sudo apt-get -q install libmysqlclient-dev libpq-dev postgresql-server-dev-all
+  - sh ./extra/travis/build_$TRAVIS_OS_NAME.sh
 
 script:
-  - mkdir ./build && cd ./build && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebugInfo
-  - make -j8
-  - make test-force || echo
+  - sh ./extra/travis/test_$TRAVIS_OS_NAME.sh
 
 notifications:
   irc:
diff --git a/extra/travis/build_linux.sh b/extra/travis/build_linux.sh
new file mode 100755
index 0000000000..4f758692ed
--- /dev/null
+++ b/extra/travis/build_linux.sh
@@ -0,0 +1,6 @@
+sudo apt-get update > /dev/null
+sudo apt-get -q install binutils-dev python-daemon python-yaml
+sudo apt-get -q install libmysqlclient-dev libpq-dev postgresql-server-dev-all
+sudo pip install six==1.9.0
+mkdir ./build && cd ./build && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebugInfo
+make -j8
diff --git a/extra/travis/build_osx.sh b/extra/travis/build_osx.sh
new file mode 100755
index 0000000000..ed5a71ae9f
--- /dev/null
+++ b/extra/travis/build_osx.sh
@@ -0,0 +1,4 @@
+sudo pip install python-daemon PyYAML
+sudo pip install six==1.9.0
+cmake . -DCMAKE_BUILD_TYPE=RelWithDebugInfo
+make -j8
diff --git a/extra/travis/test_linux.sh b/extra/travis/test_linux.sh
new file mode 100755
index 0000000000..a46adf39d4
--- /dev/null
+++ b/extra/travis/test_linux.sh
@@ -0,0 +1 @@
+cd ./build && make test || echo
diff --git a/extra/travis/test_osx.sh b/extra/travis/test_osx.sh
new file mode 100755
index 0000000000..cf294b1126
--- /dev/null
+++ b/extra/travis/test_osx.sh
@@ -0,0 +1 @@
+cd test && python test-run.py
-- 
GitLab