Remove all autotools usage (#10132)
* Bazelfying conformance tests
Adding infrastructure to "Bazelify" languages other than Java and C++
* Delete benchmarks for languages supported by other repositories
* Bazelfying benchmark tests
* Bazelfying python
Use upb's system python rule instead of branching tensorflow
* Bazelfying Ruby
* Bazelfying C#
* Bazelfying Objective-c
* Bazelfying Kokoro mac builds
* Bazelfying Kokoro linux builds
* Deleting all deprecated files from autotools cleanup
This boils down to Makefile.am and tests.sh and all of their remaining references
* Cleanup after PR reorganizing
- Enable 32 bit tests
- Move conformance tests back
- Use select statements to select alternate runtimes
- Add internal prefixes to proto library macros
* Updating READMEs to use bazel instead of autotools.
* Bazelfying Kokoro release builds
* First round of review fixes
* Second round of review fixes
* Third round of review fixes
* Filtering out conformance tests from Bazel on Windows (b/241484899)
* Add version metadata that was previously scraped from configure.ac
* fixing typo from previous fix
* Adding ruby version tests
* Bumping pinned upb version, and adding tests to python CI
diff --git a/ruby/Rakefile b/ruby/Rakefile
index d8ac763..89a00e1 100644
--- a/ruby/Rakefile
+++ b/ruby/Rakefile
@@ -39,8 +39,8 @@
if !ENV['PROTOC'].nil?
protoc_command = ENV['PROTOC']
-elsif system('../src/protoc --version')
- protoc_command = '../src/protoc'
+elsif system('../bazel-bin/protoc --version')
+ protoc_command = '../bazel-bin/protoc'
else
protoc_command = 'protoc'
end
@@ -49,7 +49,7 @@
# We won't have access to .. from within docker, but the proto files
# will be there, thanks to the :genproto rule dependency for gem:native.
-unless ENV['IN_DOCKER'] == 'true'
+unless ENV['IN_DOCKER'] == 'true' or ENV['BAZEL'] == 'true'
well_known_protos.each do |proto_file|
input_file = "../src/" + proto_file
output_file = "lib/" + proto_file.sub(/\.proto$/, "_pb.rb")
@@ -153,13 +153,15 @@
Gem::PackageTask.new(spec) do |pkg|
end
-Rake::TestTask.new(:test => [:build, :genproto]) do |t|
+# Skip build/genproto in Bazel builds, where we expect this to
+# be done already.
+Rake::TestTask.new(:test => ENV['BAZEL'] == 'true' ? [] : [:build, :genproto]) do |t|
t.test_files = FileList["tests/*.rb"].exclude("tests/gc_test.rb", "tests/common_tests.rb")
end
# gc_test needs to be split out to ensure the generated file hasn't been
# imported by other tests.
-Rake::TestTask.new(:gc_test => :build) do |t|
+Rake::TestTask.new(:gc_test => ENV['BAZEL'] == 'true' ? [] : :build) do |t|
t.test_files = FileList["tests/gc_test.rb"]
end