Fixed the PHP Kokoro build. (#7503)
* Fixed the PHP Kokoro build.
* Renamed all PHP7.4 Mac tests -> PHP7.3.
diff --git a/kokoro/macos/php7.4_mac/build.sh b/kokoro/macos/php7.3_mac/build.sh
similarity index 89%
rename from kokoro/macos/php7.4_mac/build.sh
rename to kokoro/macos/php7.3_mac/build.sh
index 98c82d4..2d2f679 100755
--- a/kokoro/macos/php7.4_mac/build.sh
+++ b/kokoro/macos/php7.3_mac/build.sh
@@ -8,4 +8,4 @@
# Prepare worker environment to run tests
source kokoro/macos/prepare_build_macos_rc
-./tests.sh php7.4_mac
+./tests.sh php7.3_mac
diff --git a/kokoro/macos/php7.4_mac/continuous.cfg b/kokoro/macos/php7.3_mac/continuous.cfg
similarity index 65%
rename from kokoro/macos/php7.4_mac/continuous.cfg
rename to kokoro/macos/php7.3_mac/continuous.cfg
index 5b2d6fd..9a71745 100644
--- a/kokoro/macos/php7.4_mac/continuous.cfg
+++ b/kokoro/macos/php7.3_mac/continuous.cfg
@@ -1,5 +1,5 @@
# Config file for running tests in Kokoro
# Location of the build script in repository
-build_file: "protobuf/kokoro/macos/php7.4_mac/build.sh"
+build_file: "protobuf/kokoro/macos/php7.3_mac/build.sh"
timeout_mins: 1440
diff --git a/kokoro/macos/php7.4_mac/continuous.cfg b/kokoro/macos/php7.3_mac/presubmit.cfg
similarity index 65%
copy from kokoro/macos/php7.4_mac/continuous.cfg
copy to kokoro/macos/php7.3_mac/presubmit.cfg
index 5b2d6fd..9a71745 100644
--- a/kokoro/macos/php7.4_mac/continuous.cfg
+++ b/kokoro/macos/php7.3_mac/presubmit.cfg
@@ -1,5 +1,5 @@
# Config file for running tests in Kokoro
# Location of the build script in repository
-build_file: "protobuf/kokoro/macos/php7.4_mac/build.sh"
+build_file: "protobuf/kokoro/macos/php7.3_mac/build.sh"
timeout_mins: 1440
diff --git a/kokoro/macos/php7.4_mac/presubmit.cfg b/kokoro/macos/php7.4_mac/presubmit.cfg
deleted file mode 100644
index 5b2d6fd..0000000
--- a/kokoro/macos/php7.4_mac/presubmit.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-# Config file for running tests in Kokoro
-
-# Location of the build script in repository
-build_file: "protobuf/kokoro/macos/php7.4_mac/build.sh"
-timeout_mins: 1440
diff --git a/tests.sh b/tests.sh
index 0f8e10c..a654565 100755
--- a/tests.sh
+++ b/tests.sh
@@ -618,6 +618,7 @@
# Install PHP
curl -s https://php-osx.liip.ch/install.sh | bash -s 5.6
PHP_FOLDER=`find /usr/local -type d -name "php5-5.6*"` # The folder name may change upon time
+ test ! -z "$PHP_FOLDER"
export PATH="$PHP_FOLDER/bin:$PATH"
# Install phpunit
@@ -693,7 +694,8 @@
generate_php_test_proto
# Install PHP
curl -s https://php-osx.liip.ch/install.sh | bash -s 7.0
- PHP_FOLDER=`find /usr/local -type d -name "php7-7.0*"` # The folder name may change upon time
+ PHP_FOLDER=`find /usr/local -type d -name "php5-7.0*"` # The folder name may change upon time
+ test ! -z "$PHP_FOLDER"
export PATH="$PHP_FOLDER/bin:$PATH"
# Install phpunit
@@ -713,11 +715,14 @@
popd
}
-build_php7.4_mac() {
+build_php7.3_mac() {
generate_php_test_proto
# Install PHP
- curl -s https://php-osx.liip.ch/install.sh | bash -s 7.4
- PHP_FOLDER=`find /usr/local -type d -name "php7-7.4*"` # The folder name may change upon time
+ # We can't test PHP 7.4 with these binaries yet:
+ # https://github.com/liip/php-osx/issues/276
+ curl -s https://php-osx.liip.ch/install.sh | bash -s 7.3
+ PHP_FOLDER=`find /usr/local -type d -name "php5-7.3*"` # The folder name may change upon time
+ test ! -z "$PHP_FOLDER"
export PATH="$PHP_FOLDER/bin:$PATH"
# Install phpunit