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 36a46c3 commit ca56d25
Show file tree
Hide file tree
Showing 2 changed files with 12 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
3 changes: 3 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:
- name: test all
if: ${{ runner.os == 'Linux' }}
run: bash -x .ci/integration_test.sh -a
- name: install zlib z3
if: ${{ runner.os == 'macOS' }}
run: brew install zlib
- name: test without amop
if: ${{ runner.os == 'macOS' }}
run: bash .ci/integration_test.sh

0 comments on commit ca56d25

Please sign in to comment.