Skip to content

Commit

Permalink
Fix kokoro issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mkruskal-google committed Jul 20, 2022
1 parent 88f5230 commit 393448a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 17 deletions.
7 changes: 4 additions & 3 deletions kokoro/macos/php74/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ cd $(dirname $0)/../../..
source kokoro/macos/prepare_build_macos_rc

# Install PHP + Composer
brew install [email protected] composer pcre2
brew install --overwrite [email protected] 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
7 changes: 4 additions & 3 deletions kokoro/macos/php80/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ cd $(dirname $0)/../../..
source kokoro/macos/prepare_build_macos_rc

# Install PHP + Composer
brew install [email protected] composer pcre2
brew install --overwrite [email protected] 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
2 changes: 1 addition & 1 deletion kokoro/macos/php80/continuous.cfg
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion kokoro/macos/php80/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -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
12 changes: 3 additions & 9 deletions kokoro/macos/prepare_build_macos_rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 393448a

Please sign in to comment.