language: ruby
rvm:
  - 2.1.0
  - 2.0.0
  - 1.9.3
  - jruby-19mode
  - rbx-19mode
before_install:
  #- script/install-kyotocabinet
  - sudo apt-get install -qq libtokyocabinet8 libtokyocabinet-dev liblzo2-dev libtdb-dev libleveldb-dev tokyotyrant
  - script/start-services
  - script/install-bundle
  - script/upload-bundle
  - script/wait-services
install: 'echo "Bundle installed"'
before_script:
  - mysql -e 'create database moneta;'
  - mysql -e 'create database moneta_activerecord1;'
  - mysql -e 'create database moneta_activerecord2;'
env:
  global:
    - secure: "dtM4n7FP8P0UI9Iq+nsvQ7/yfDqsxhfCO9i8zMxm/f9Kxj5Z/4C7jsXsLA+e\n/7FZ9+ld2QjPSPU0LUiDpj/z81bxyZHwqocQ7Nb0DVvO3JRHpr4/iBQQQHd3\n0jvou3mRbu5mBlUjf1/ALaZA+b+vcnsF9fd86UnkY+ChriylGnM="
  matrix:
    - "SCRIPT='parallel-tests 1/10'"
    - "SCRIPT='parallel-tests 2/10'"
    - "SCRIPT='parallel-tests 3/10'"
    - "SCRIPT='parallel-tests 4/10'"
    - "SCRIPT='parallel-tests 5/10'"
    - "SCRIPT='parallel-tests 6/10'"
    - "SCRIPT='parallel-tests 7/10'"
    - "SCRIPT='parallel-tests 8/10'"
    - "SCRIPT='parallel-tests 9/10'"
    - "SCRIPT='parallel-tests 10/10'"
    - "SCRIPT='parallel-tests unstable'"
    - "SCRIPT='benchmarks uniform_small'"
    - "SCRIPT='benchmarks uniform_medium'"
    - "SCRIPT='benchmarks uniform_large'"
    - "SCRIPT='benchmarks normal_small'"
    - "SCRIPT='benchmarks normal_medium'"
    - "SCRIPT='benchmarks normal_large'"
matrix:
  allow_failures:
    - rvm: jruby-19mode
    - rvm: rbx-19mode
    - env: "SCRIPT='parallel-tests unstable'"
script: "eval bundle exec ruby script/$SCRIPT"
branches:
  only:
    - master
    - travis
