diff --git a/.circleci/config.yml b/.circleci/config.yml index c3592a5..647e6f0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,25 +12,28 @@ ruby_env: &ruby_env docker: - image: circleci/ruby:<> +gem_cache_key: &gem_cache_key + gem_cache_key: "gem-cache-v2" + executors: ruby_2_6: <<: *ruby_env parameters: ruby-version: type: string - default: "2.6.6" + default: "2.6" ruby_2_7: <<: *ruby_env parameters: ruby-version: type: string - default: "2.7.1" + default: "2.7" ruby_3_0: <<: *ruby_env parameters: ruby-version: type: string - default: "3.0.0" + default: "3.0" commands: pre-setup: @@ -38,21 +41,24 @@ commands: - add_ssh_keys - checkout bundle-install: + parameters: + gem_cache_key: + type: string + default: "gem-cache-v2" steps: - - run: - name: "Install bundler 1.17.3" - command: | - echo 'export BUNDLER_VERSION=1.17.3' >> $BASH_ENV - source $BASH_ENV - gem install bundler:1.17.3 - restore_cache: keys: - - gem-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - gem-cache-{{ arch }}-{{ .Branch }} - - gem-cache - - run: bundle check --path vendor/bundle || bundle install --path vendor/bundle + - <>-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }} + - <>-{{ arch }}-{{ .Branch }} + - <> + - run: + name: "bundle install" + command: | + bundle config set --local path 'vendor/bundle' + bundle lock --add-platform x86_64-linux + bundle check || bundle install - save_cache: - key: gem-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }} + key: <>-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }} paths: - vendor/bundle rspec-unit: @@ -98,7 +104,8 @@ jobs: default: "ruby_2_6" steps: - pre-setup - - bundle-install + - bundle-install: + <<: *gem_cache_key - bundle-audit rubocop: executor: <> @@ -108,7 +115,8 @@ jobs: default: "ruby_2_6" steps: - pre-setup - - bundle-install + - bundle-install: + <<: *gem_cache_key - bundle-audit rspec-unit: executor: <> @@ -118,7 +126,8 @@ jobs: default: "ruby_2_6" steps: - pre-setup - - bundle-install + - bundle-install: + <<: *gem_cache_key - rspec-unit e2e: executor: <> @@ -128,7 +137,8 @@ jobs: default: "ruby_2_6" steps: - pre-setup - - bundle-install + - bundle-install: + <<: *gem_cache_key - e2e workflows: diff --git a/gruf.gemspec b/gruf.gemspec index 3800a5a..6aeccaf 100644 --- a/gruf.gemspec +++ b/gruf.gemspec @@ -35,7 +35,6 @@ Gem::Specification.new do |spec| spec.required_ruby_version = '>= 2.6', '< 3.1' - spec.add_development_dependency 'bundler', '~> 1.11' spec.add_development_dependency 'bundler-audit', '>= 0.6' # rubocop:disable Gemspec/RubyVersionGlobalsUsage spec.add_development_dependency( @@ -57,10 +56,10 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'activesupport', '> 4' spec.add_runtime_dependency 'concurrent-ruby', '> 1' - spec.add_runtime_dependency 'e2mmap', '~> 0.1' + spec.add_runtime_dependency 'e2mmap', '>= 0.1' spec.add_runtime_dependency 'grpc', '~> 1.10' spec.add_runtime_dependency 'grpc-tools', '~> 1.10' spec.add_runtime_dependency 'json', '>= 2.3' - spec.add_runtime_dependency 'slop', '~> 4.6' - spec.add_runtime_dependency 'thwait', '~> 0.1' + spec.add_runtime_dependency 'slop', '>= 4.6' + spec.add_runtime_dependency 'thwait', '>= 0.1' end