Skip to content

Commit

Permalink
fix macOS ci use apple silicon
Browse files Browse the repository at this point in the history
  • Loading branch information
bxq2011hust committed May 13, 2024
1 parent 7a6f71b commit 423c6a3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .ci/integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,19 @@ get_csdk_lib()
if [ ! -d "/usr/local/lib/" ];then
sudo mkdir -p /usr/local/lib
fi
local platform_arch=$(uname -p)

local suffix="so"
if [ ! -z "${macOS}" ];then # macOS
suffix="dylib"
fi
if [ ! -f "/usr/local/lib/libbcos-c-sdk.${suffix}" ];then
curl -#LO "https://github.com/FISCO-BCOS/bcos-c-sdk/releases/download/${c_sdk_version}/libbcos-c-sdk.${suffix}"
sudo cp "libbcos-c-sdk.${suffix}" /usr/local/lib/
local c_sdk_lib_name="libbcos-c-sdk.${suffix}"
if [ "${platform_arch}" == "arm" ];then
c_sdk_lib_name="libbcos-c-sdk-aarch64.${suffix}"
fi
if [ ! -f "/usr/local/lib/${c_sdk_lib_name}" ];then
curl -#LO "https://github.com/FISCO-BCOS/bcos-c-sdk/releases/download/${c_sdk_version}/${c_sdk_lib_name}"
sudo cp "${c_sdk_lib_name}" /usr/local/lib/
fi
}

Expand Down

0 comments on commit 423c6a3

Please sign in to comment.