Przeglądaj źródła

Fixed the PHP Kokoro build. (#7503)

* Fixed the PHP Kokoro build.

* Renamed all PHP7.4 Mac tests -> PHP7.3.
Joshua Haberman 5 lat temu
rodzic
commit
27ba0c5bb0

+ 1 - 1
kokoro/macos/php7.4_mac/build.sh → kokoro/macos/php7.3_mac/build.sh

@@ -8,4 +8,4 @@ cd $(dirname $0)/../../..
 # Prepare worker environment to run tests
 source kokoro/macos/prepare_build_macos_rc
 
-./tests.sh php7.4_mac
+./tests.sh php7.3_mac

+ 1 - 1
kokoro/macos/php7.4_mac/continuous.cfg → 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

+ 1 - 1
kokoro/macos/php7.4_mac/presubmit.cfg → 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

+ 9 - 4
tests.sh

@@ -618,6 +618,7 @@ build_php5.6_mac() {
   # 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 @@ build_php7.0_mac() {
   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 @@ build_php7.0_mac() {
   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