From 393448aee824242c99f0c7ae797fbe2083484bdb Mon Sep 17 00:00:00 2001 From: mkruskal-google Date: Tue, 19 Jul 2022 15:49:40 -0700 Subject: [PATCH] Fix kokoro issues --- kokoro/macos/php74/build.sh | 7 ++++--- kokoro/macos/php80/build.sh | 7 ++++--- kokoro/macos/php80/continuous.cfg | 2 +- kokoro/macos/php80/presubmit.cfg | 2 +- kokoro/macos/prepare_build_macos_rc | 12 +++--------- 5 files changed, 13 insertions(+), 17 deletions(-) diff --git a/kokoro/macos/php74/build.sh b/kokoro/macos/php74/build.sh index e4877818d75f6..f61948c1b12e9 100755 --- a/kokoro/macos/php74/build.sh +++ b/kokoro/macos/php74/build.sh @@ -9,15 +9,16 @@ cd $(dirname $0)/../../.. source kokoro/macos/prepare_build_macos_rc # Install PHP + Composer -brew install php@7.4 composer pcre2 +brew install --overwrite php@7.4 composer # Configure path -PHP_FOLDER=$(find /opt/homebrew -type d -regex ".*php.*/7.4.[0-9]*") +HOMEBREW_PREFIX=$(brew --prefix) +PHP_FOLDER=$(find $HOMEBREW_PREFIX -type d -regex ".*php.*/7.4.[0-9]*") test ! -z "$PHP_FOLDER" export PATH="$PHP_FOLDER/bin:$PATH" # Fix missing pcre2.h in homebrew's PHP -ln -s $(find /opt/homebrew/Cellar/pcre2 -name pcre2.h) $PHP_FOLDER/include/php/ext/pcre/pcre2.h +#ln -s $(find $HOMEBREW_PREFIX/Cellar/pcre2 -name pcre2.h) $PHP_FOLDER/include/php/ext/pcre/pcre2.h # Test ./tests.sh php_mac diff --git a/kokoro/macos/php80/build.sh b/kokoro/macos/php80/build.sh index 8e4a4ab0ed687..48c552037a927 100755 --- a/kokoro/macos/php80/build.sh +++ b/kokoro/macos/php80/build.sh @@ -9,15 +9,16 @@ cd $(dirname $0)/../../.. source kokoro/macos/prepare_build_macos_rc # Install PHP + Composer -brew install php@8.0 composer pcre2 +brew install --overwrite php@8.0 composer # Configure path -PHP_FOLDER=$(find /opt/homebrew -type d -regex ".*php.*/8.0.[0-9]*") +HOMEBREW_PREFIX=$(brew --prefix) +PHP_FOLDER=$(find $HOMEBREW_PREFIX -type d -regex ".*php.*/8.0.[0-9]*") test ! -z "$PHP_FOLDER" export PATH="$PHP_FOLDER/bin:$PATH" # Fix missing pcre2.h in homebrew's PHP -ln -s $(find /opt/homebrew/Cellar/pcre2 -name pcre2.h) $PHP_FOLDER/include/php/ext/pcre/pcre2.h +ln -s $(find $HOMEBREW_PREFIX/Cellar/pcre2 -name pcre2.h) $PHP_FOLDER/include/php/ext/pcre/pcre2.h # Test ./tests.sh php_mac diff --git a/kokoro/macos/php80/continuous.cfg b/kokoro/macos/php80/continuous.cfg index 9a717451d373b..ded43e62c57fd 100644 --- a/kokoro/macos/php80/continuous.cfg +++ b/kokoro/macos/php80/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.3_mac/build.sh" +build_file: "protobuf/kokoro/macos/php80/build.sh" timeout_mins: 1440 diff --git a/kokoro/macos/php80/presubmit.cfg b/kokoro/macos/php80/presubmit.cfg index 9a717451d373b..ded43e62c57fd 100644 --- a/kokoro/macos/php80/presubmit.cfg +++ b/kokoro/macos/php80/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.3_mac/build.sh" +build_file: "protobuf/kokoro/macos/php80/build.sh" timeout_mins: 1440 diff --git a/kokoro/macos/prepare_build_macos_rc b/kokoro/macos/prepare_build_macos_rc index 291e8d0090145..d63d25557dd47 100755 --- a/kokoro/macos/prepare_build_macos_rc +++ b/kokoro/macos/prepare_build_macos_rc @@ -7,11 +7,8 @@ set -eux ## # Select Xcode version -# Remember to update the Xcode version when Xcode_11.3.app is not available. -# If xcode is not available, it will probably encounter the failure for -# "autom4te: need GNU m4 1.4 or later: /usr/bin/m4" -# go/kokoro/userdocs/macos/selecting_xcode.md for more information. -export DEVELOPER_DIR=/Applications/Xcode_11.3.app/Contents/Developer +export DEVELOPER_DIR=/Applications/Xcode_13.3.1.app/Contents/Developer +sudo xcode-select -s "${DEVELOPER_DIR}" ## # Select C/C++ compilers @@ -33,10 +30,7 @@ if [[ "${KOKORO_INSTALL_RVM:-}" == "yes" ]] ; then curl -sSL https://rvm.io/mpapis.asc | gpg --import - curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - - # Old OpenSSL versions cannot handle the SSL certificate used by - # https://get.rvm.io, so as a workaround we download RVM directly from - # GitHub. See this issue for details: https://github.com/rvm/rvm/issues/5133 - curl -sSL https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s master --ruby + curl -sSl https://rvm.io | bash fi # "Install" valgrind