language: ruby
sudo: false
os:
  - linux
  - osx
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - libgmp-dev
    - libmpfr-dev
    - libmpc-dev
    - binutils-dev
    - g++-4.7
rvm:
 - 1.9.3
 - 2.0
 - 2.1
 - 2.2

matrix:
  exclude:
    - os: osx
  include:
    - os: osx
      rvm: 1.9.3

install:
  - export RUBY_SOURCE_DIR=`pwd`
  - export TEST_CPP="no"

  - git clone https://github.com/symengine/symengine symengine-cpp
  - cd symengine-cpp
  - git checkout `cat ../symengine_version.txt`

  # Setup travis for C++ library
  - source bin/install_travis.sh

  # Build C++ library
  - bin/test_travis.sh

  # Setup travis for Ruby wrappers
  - cd $RUBY_SOURCE_DIR
  - bundle install

script:
  # Build ruby gem
  - gem build symengine.gemspec
  # Install ruby gem
  - gem install symengine-0.1.0.gem --install-dir $HOME --verbose -- -DSymEngine_DIR=$our_install_dir

  # Test ruby gem
  - gem install gem-path --no-ri --no-rdoc
  - cd $HOME/gems/symengine-0.1.0/
  - bundle exec rspec

notifications:
  email: false

language: ruby
sudo: false
os:
  - linux
  - osx
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - libgmp-dev
    - libmpfr-dev
    - libmpc-dev
    - binutils-dev
    - g++-4.7
rvm:
 - 1.9.3
 - 2.0
 - 2.1
 - 2.2

matrix:
  exclude:
    - os: osx
  include:
    - os: osx
      rvm: 1.9.3
  allow_failures:
    - os: osx
      rvm: 1.9.3

install:
  - export RUBY_SOURCE_DIR=`pwd`
  - export TEST_CPP="no"

  - git clone https://github.com/symengine/symengine symengine-cpp
  - cd symengine-cpp
  - git checkout `cat ../symengine_version.txt`

  # Setup travis for C++ library
  - source bin/install_travis.sh

  # Build C++ library
  - bin/test_travis.sh

  # Setup travis for Ruby wrappers
  - cd $RUBY_SOURCE_DIR
  - bundle install

script:
  # Build ruby gem
  - gem build symengine.gemspec
  # Install ruby gem
  - gem install symengine-0.1.0.gem --install-dir $HOME --verbose -- -DSymEngine_DIR=$our_install_dir

  # Test ruby gem
  - gem install gem-path --no-ri --no-rdoc
  - cd $HOME/gems/symengine-0.1.0/
  - bundle exec rspec

notifications:
  email: false

Add OS X test to allowed_failures
Add OS X test to allowed_failures
