ci: issue with linking unixodbc when building OTP on macos arm64

This commit is contained in:
Ivan Dyachkov 2022-12-22 14:46:56 +01:00
parent 1af768f75a
commit d8590197bd
1 changed files with 8 additions and 0 deletions

View File

@ -55,10 +55,18 @@ runs:
fi
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 LDFLAGS="-L$(brew --prefix unixodbc)/lib"
export CC="/usr/bin/gcc -I$(brew --prefix unixodbc)/include"
fi
./configure --disable-dynamic-ssl-lib --with-ssl=$(brew --prefix openssl@1.1) --disable-hipe --disable-jit --prefix="$OTP_INSTALL_PATH"
make -j$(nproc)
rm -rf "$OTP_INSTALL_PATH"
make install
if [ "$(arch)" = arm64 ]; then
unset LDFLAGS
unset CC
fi
- name: build
env:
HOMEBREW_NO_AUTO_UPDATE: 1