diff --git a/kokoro/macos/php74/build.sh b/kokoro/macos/php74/build.sh index b9f7de8f372c..ff3965756c77 100755 --- a/kokoro/macos/php74/build.sh +++ b/kokoro/macos/php74/build.sh @@ -12,13 +12,9 @@ source kokoro/macos/prepare_build_macos_rc brew install coreutils php@7.4 # Configure path -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 $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 1b4767b78a10..84e2c464ef78 100755 --- a/kokoro/macos/php80/build.sh +++ b/kokoro/macos/php80/build.sh @@ -12,13 +12,9 @@ source kokoro/macos/prepare_build_macos_rc brew install coreutils php@8.0 # Configure path -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 $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/prepare_build_macos_rc b/kokoro/macos/prepare_build_macos_rc index 0bc777979400..7ec2832b8596 100755 --- a/kokoro/macos/prepare_build_macos_rc +++ b/kokoro/macos/prepare_build_macos_rc @@ -4,9 +4,10 @@ set -eux +export HOMEBREW_PREFIX=$(brew --prefix) + ## # Select Xcode version - export DEVELOPER_DIR=/Applications/Xcode_13.3.1.app/Contents/Developer sudo xcode-select -s "${DEVELOPER_DIR}" @@ -21,14 +22,19 @@ if [[ "${KOKORO_INSTALL_TOX:-}" == "yes" ]] ; then sudo python3 -m pip install --upgrade pip tox fi -# "Install" valgrind +## +# Setup RVM +if [[ "${KOKORO_INSTALL_RVM:-}" == "yes" ]] ; then + git config --global --add safe.directory $HOMEBREW_PREFIX/Library/Taps/homebrew/homebrew-cask + git config --global --add safe.directory $HOMEBREW_PREFIX/Library/Taps/homebrew/homebrew-core + git config --global --add safe.directory $HOMEBREW_PREFIX/Library/Taps/homebrew/homebrew-services + sudo chown -R $(whoami) $HOME/.rvm/ +fi + +# "Install" valgrind if it doesn't exist ## if [ ! -x "$(command -v valgrind)" ]; then echo "#! /bin/bash" > valgrind chmod ug+x valgrind sudo mv valgrind /usr/local/bin/valgrind fi - -git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core -git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask -sudo chown -R $(whoami) $HOME/.rvm/ diff --git a/kokoro/macos/ruby25/build.sh b/kokoro/macos/ruby25/build.sh index 38e90aa75c52..48c894081b8d 100755 --- a/kokoro/macos/ruby25/build.sh +++ b/kokoro/macos/ruby25/build.sh @@ -6,6 +6,7 @@ cd $(dirname $0)/../../.. # Prepare worker environment to run tests +KOKORO_INSTALL_RVM=yes source kokoro/macos/prepare_build_macos_rc ./tests.sh ruby25 diff --git a/kokoro/macos/ruby26/build.sh b/kokoro/macos/ruby26/build.sh index 6c33ed0a7e66..1b94fe1b5568 100755 --- a/kokoro/macos/ruby26/build.sh +++ b/kokoro/macos/ruby26/build.sh @@ -6,6 +6,7 @@ cd $(dirname $0)/../../.. # Prepare worker environment to run tests +KOKORO_INSTALL_RVM=yes source kokoro/macos/prepare_build_macos_rc ./tests.sh ruby26 diff --git a/kokoro/macos/ruby27/build.sh b/kokoro/macos/ruby27/build.sh index 16bcbd6cbd6f..baebdb792a6a 100755 --- a/kokoro/macos/ruby27/build.sh +++ b/kokoro/macos/ruby27/build.sh @@ -6,6 +6,7 @@ cd $(dirname $0)/../../.. # Prepare worker environment to run tests +KOKORO_INSTALL_RVM=yes source kokoro/macos/prepare_build_macos_rc ./tests.sh ruby27 diff --git a/kokoro/macos/ruby30/build.sh b/kokoro/macos/ruby30/build.sh index 5b4f6133a72d..b1e0641c96e1 100755 --- a/kokoro/macos/ruby30/build.sh +++ b/kokoro/macos/ruby30/build.sh @@ -6,6 +6,7 @@ cd $(dirname $0)/../../.. # Prepare worker environment to run tests +KOKORO_INSTALL_RVM=yes source kokoro/macos/prepare_build_macos_rc ./tests.sh ruby30 diff --git a/kokoro/macos/ruby31/build.sh b/kokoro/macos/ruby31/build.sh index 198a86150a34..1b5a5a5a60eb 100644 --- a/kokoro/macos/ruby31/build.sh +++ b/kokoro/macos/ruby31/build.sh @@ -6,6 +6,7 @@ cd $(dirname $0)/../../.. # Prepare worker environment to run tests +KOKORO_INSTALL_RVM=yes source kokoro/macos/prepare_build_macos_rc ./tests.sh ruby31