Fix CI failures
diff --git a/kokoro/release/ruby/linux/ruby/ruby_build.sh b/kokoro/release/ruby/linux/ruby/ruby_build.sh
index 12d270e..34a85ab 100755
--- a/kokoro/release/ruby/linux/ruby/ruby_build.sh
+++ b/kokoro/release/ruby/linux/ruby/ruby_build.sh
@@ -10,6 +10,9 @@
 cp bazel-bin/protoc .
 export PROTOC=$PWD/protoc
 
+# Pull in dependencies.
+git submodule update --init --recursive
+
 umask 0022
 pushd ruby
 gem install bundler -v 2.1.4
diff --git a/kokoro/release/ruby/macos/ruby/ruby_build.sh b/kokoro/release/ruby/macos/ruby/ruby_build.sh
index bbfc631..d13c120 100755
--- a/kokoro/release/ruby/macos/ruby/ruby_build.sh
+++ b/kokoro/release/ruby/macos/ruby/ruby_build.sh
@@ -6,6 +6,9 @@
 bazel build //:protoc
 export PROTOC=$PWD/bazel-bin/protoc
 
+# Pull in dependencies.
+git submodule update --init --recursive
+
 umask 0022
 pushd ruby
 bundle update && bundle exec rake gem:native
diff --git a/php/tests/compile_extension.sh b/php/tests/compile_extension.sh
index f9fb8cd..a645ed6 100755
--- a/php/tests/compile_extension.sh
+++ b/php/tests/compile_extension.sh
@@ -12,7 +12,7 @@
 # (and for the release to PECL).
 rm -rf ext/google/protobuf/third_party
 mkdir -p ext/google/protobuf/third_party/utf8_range
-cp ../third_party/utf8_range/* ext/google/protobuf/third_party/utf8_range
+cp -r ../third_party/utf8_range/* ext/google/protobuf/third_party/utf8_range
 
 echo "Copied utf8_range from ../third_party -> ext/google/protobuf/third_party"