version: 2.1 orbs: ruby: circleci/ruby@1.0 workflows: test: jobs: - test: name: "Sphinx 2.2" sphinx_version: 2.2.11 sphinx_engine: sphinx debian: jessie ruby: '2.4.6' matrix: parameters: database: [ 'mysql2', 'postgresql' ] rails: [ '4_2', '5_0', '5_1', '5_2' ] - test: name: "Sphinx 3.4" sphinx_version: 3.4.1 sphinx_engine: sphinx debian: buster matrix: parameters: database: [ 'mysql2' ] ruby: [ '2.4.10', '2.5.9', '2.6.9', '2.7.5', '3.0.3' ] rails: [ '4_2', '5_0', '5_1', '5_2' ] exclude: - rails: '4_2' ruby: '2.5.9' - rails: '4_2' ruby: '2.6.9' - rails: '4_2' ruby: '2.7.5' - rails: '4_2' ruby: '3.0.3' - rails: '5_0' ruby: '3.0.3' - rails: '5_1' ruby: '3.0.3' - rails: '5_2' ruby: '3.0.3' - rails: '6_0' ruby: '2.4.10' - rails: '6_1' ruby: '2.4.10' - rails: '7_0' ruby: '2.4.10' - rails: '7_0' ruby: '2.5.9' - rails: '7_0' ruby: '2.6.9' - test: name: "Manticore 3.5" sphinx_version: 3.5.4 sphinx_engine: manticore debian: buster matrix: parameters: database: [ 'mysql2', 'postgresql' ] ruby: [ '2.4.10', '2.5.9', '2.6.9', '2.7.5', '3.0.3' ] rails: [ '4_2', '5_0', '5_1', '5_2' ] exclude: - rails: '4_2' ruby: '2.5.9' - rails: '4_2' ruby: '2.6.9' - rails: '4_2' ruby: '2.7.5' - rails: '4_2' ruby: '3.0.3' - rails: '5_0' ruby: '3.0.3' - rails: '5_1' ruby: '3.0.3' - rails: '5_2' ruby: '3.0.3' - rails: '6_0' ruby: '2.4.10' - rails: '6_1' ruby: '2.4.10' - rails: '7_0' ruby: '2.4.10' - rails: '7_0' ruby: '2.5.9' - rails: '7_0' ruby: '2.6.9' - test: name: "Manticore 4.0" sphinx_version: 4.0.2 sphinx_engine: manticore debian: buster matrix: parameters: database: [ 'mysql2', 'postgresql' ] ruby: [ '2.4.10', '2.5.9', '2.6.9', '2.7.5', '3.0.3' ] rails: [ '4_2', '5_0', '5_1', '5_2' ] exclude: - rails: '4_2' ruby: '2.5.9' - rails: '4_2' ruby: '2.6.9' - rails: '4_2' ruby: '2.7.5' - rails: '4_2' ruby: '3.0.3' - rails: '5_0' ruby: '3.0.3' - rails: '5_1' ruby: '3.0.3' - rails: '5_2' ruby: '3.0.3' - rails: '6_0' ruby: '2.4.10' - rails: '6_1' ruby: '2.4.10' - rails: '7_0' ruby: '2.4.10' - rails: '7_0' ruby: '2.5.9' - rails: '7_0' ruby: '2.6.9' jobs: test: parameters: ruby: type: string rails: type: string database: type: string sphinx_version: type: string sphinx_engine: type: string debian: type: string docker: - image: circleci/ruby:<< parameters.ruby >>-<< parameters.debian >> - image: circleci/postgres:10 environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: thinking_sphinx POSTGRES_DB: thinking_sphinx - image: circleci/mysql:5.7 environment: MYSQL_ROOT_PASSWORD: thinking_sphinx MYSQL_DATABASE: thinking_sphinx working_directory: ~/app steps: - checkout - restore_cache: keys: - v1-dependencies-<< parameters.ruby >>-<< parameters.rails >> - run: name: install bundler command: | if [ "<< parameters.ruby >>" == "2.7.5" ]; then export BUNDLER_VERSION=2.1.4 elif [ "<< parameters.ruby >>" == "3.0.3" ]; then export BUNDLER_VERSION=2.1.4 else export BUNDLER_VERSION=1.17.3 fi export BUNDLE_PATH=vendor/bundle gem install bundler:$BUNDLER_VERSION - run: name: install dependencies command: | bundle install --jobs=4 --retry=3 --path vendor/bundle bundle update - run: name: set up appraisal command: bundle exec appraisal generate - run: name: update gems environment: BUNDLE_GEMFILE: "./gemfiles/rails_<< parameters.rails >>.gemfile" command: | if [[ -f $BUNDLE_GEMFILE ]] then bundle update fi - save_cache: paths: - ./vendor/bundle key: v1-dependencies-<< parameters.ruby >>-<< parameters.rails >> - run: name: set up sphinx command: "./bin/loadsphinx << parameters.sphinx_version >> << parameters.sphinx_engine >>" - run: name: tests environment: CI: "true" DATABASE: << parameters.database >> SPHINX_VERSION: << parameters.sphinx_version >> SPHINX_ENGINE: << parameters.sphinx_engine >> BUNDLE_GEMFILE: "./gemfiles/rails_<< parameters.rails >>.gemfile" command: | if [[ -f $BUNDLE_GEMFILE ]] then bundle exec rspec fi