Skip to content

Commit

Permalink
update travis, rakefile, and protoc
Browse files Browse the repository at this point in the history
- add ruby 2.6 to travis, remove EOL-ed rubies
- the newer versions of protoc have a --ruby_out that takes precedence,
alias the ruby plugin so it works with new versions of protoc
- use binary protoc version 3.8.0
  • Loading branch information
nerdrew committed Jun 25, 2019
1 parent d6b4313 commit 681633d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 45 deletions.
18 changes: 4 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,20 @@ before_install:
- sudo make install
# Retrun to project directory
- cd ..
- sudo -E ./install-protobuf.sh
- curl -SsfL -O https://github.com/protocolbuffers/protobuf/releases/download/v3.8.0/protoc-3.8.0-linux-x86_64.zip
- sudo -E unzip -d /usr protoc-3.8.0-linux-x86_64.zip
- java -Xmx1g -version
- javac -J-Xmx1g -version
- export JRUBY_OPTS=-J-Xmx1g
- gem update bundler
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- jruby-9.1.17.0
- jruby-9.2.5.0
- rbx-2
env:
- PROTOBUF_VERSION=2.6.1
- PROTOBUF_VERSION=3.0.0-alpha-2
matrix:
allow_failures:
- rvm: rbx-2
- env: PROTOBUF_VERSION=3.0.0-alpha-2
- jruby-9.2.7.0
notifications:
webhooks:
urls:
Expand Down
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ task :default => ['compile:spec', 'compile:rpc', :spec, :rubocop]
desc 'Run specs'
namespace :compile do

desc 'Compile spec protos in spec/supprt/ directory'
desc 'Compile spec protos in spec/support/ directory'
task :spec do
proto_path = ::File.expand_path('../spec/support/', __FILE__)
proto_files = Dir[File.join(proto_path, '**', '*.proto')]
cmd = %(protoc --plugin=./bin/protoc-gen-ruby --ruby_out=#{proto_path} -I #{proto_path} #{proto_files.join(' ')})
cmd = %(protoc --plugin=protoc-gen-ruby-protobuf=./bin/protoc-gen-ruby --ruby-protobuf_out=#{proto_path} -I #{proto_path} #{proto_files.join(' ')})

puts cmd
system(cmd)
Expand All @@ -35,7 +35,7 @@ namespace :compile do
output_dir = ::File.expand_path('../tmp/rpc', __FILE__)
::FileUtils.mkdir_p(output_dir)

cmd = %(protoc --plugin=./bin/protoc-gen-ruby --ruby_out=#{output_dir} -I #{proto_path} #{proto_files.join(' ')})
cmd = %(protoc --plugin=protoc-gen-ruby-protobuf=./bin/protoc-gen-ruby --ruby-protobuf_out=#{output_dir} -I #{proto_path} #{proto_files.join(' ')})

puts cmd
system(cmd)
Expand Down
28 changes: 0 additions & 28 deletions install-protobuf.sh

This file was deleted.

0 comments on commit 681633d

Please sign in to comment.