From ca56d25a42c15dd67829cb8a0479f136bf7862b0 Mon Sep 17 00:00:00 2001 From: bxq2011hust Date: Mon, 13 May 2024 17:51:50 +0800 Subject: [PATCH] fix macOS ci use apple silicon --- .ci/integration_test.sh | 12 +++++++++--- .github/workflows/workflow.yml | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.ci/integration_test.sh b/.ci/integration_test.sh index 615c3b79..924a8f32 100755 --- a/.ci/integration_test.sh +++ b/.ci/integration_test.sh @@ -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 } diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 9c255e8f..d5c36049 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -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 \ No newline at end of file