From b3c079dc21946d397b8e77213f4e9ea0620eb7a0 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Tue, 6 Jun 2023 01:21:09 +0200 Subject: [PATCH] ci: try --with-odbc --- .github/actions/package-macos/action.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/actions/package-macos/action.yaml b/.github/actions/package-macos/action.yaml index b53be1666..180621c67 100644 --- a/.github/actions/package-macos/action.yaml +++ b/.github/actions/package-macos/action.yaml @@ -67,8 +67,8 @@ runs: SELF_HOSTED="${{ steps.prepare.outputs.SELF_HOSTED }}" # when it's self-hosted, it never hits the cache, # skip rebuild if it's self-hosted and the install path already has a 'bin' - if [ "$SELF_HOSTED" = 'true' ]; then - if [ -n "$OTP_INSTALL_PATH" && -d "$OTP_INSTALL_PATH/bin" ]; then + if [ "${SELF_HOSTED:-false}" = 'true' ]; then + if [ -n "$OTP_INSTALL_PATH" ] && [ -d "$OTP_INSTALL_PATH/bin" ]; then echo "Skip rebuilding OTP, found $OTP_INSTALL_PATH" exit 0 fi @@ -81,10 +81,13 @@ runs: git clone --depth 1 --branch OTP-${{ inputs.otp }} https://github.com/emqx/otp.git "$OTP_SOURCE_PATH" cd "$OTP_SOURCE_PATH" if [ "$(arch)" = arm64 ]; then + export CFLAGS="-I$(brew --prefix unixodbc)/include" export LDFLAGS="-L$(brew --prefix unixodbc)/lib" - export CC="/usr/bin/gcc -I$(brew --prefix unixodbc)/include" + WITH_ODBC="--with-odbc=$(brew --prefix unixodbc)" + else + WITH_ODBC="" fi - ./configure --disable-dynamic-ssl-lib --with-ssl=$(brew --prefix openssl@1.1) --disable-hipe --disable-jit --prefix="$OTP_INSTALL_PATH" + ./configure --disable-dynamic-ssl-lib --with-ssl=$(brew --prefix openssl@1.1) ${WITH_ODBC} --disable-hipe --disable-jit --prefix="$OTP_INSTALL_PATH" make -j$(nproc) rm -rf "$OTP_INSTALL_PATH" make install