This is an automated email from the ASF dual-hosted git repository. wutao pushed a commit to branch v2.2 in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git
commit b16994b29b4d5e07b6f039838cefa9e6d4fb24ac Author: Wu Tao <[email protected]> AuthorDate: Mon Mar 22 04:59:40 2021 -0500 fix(scripts): skip packaging irrelevant libs (#700) --- .github/workflows/ci-pull-request.yaml | 8 +++++++- scripts/pack_common.sh | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-pull-request.yaml b/.github/workflows/ci-pull-request.yaml index 5bc0d5d..d60ab02 100644 --- a/.github/workflows/ci-pull-request.yaml +++ b/.github/workflows/ci-pull-request.yaml @@ -9,7 +9,7 @@ name: pull_request on: # run on each pull request pull_request: - types: [ synchronize, reopened, labeled ] + types: [ synchronize, opened ] branches: - master - 'v[0-9]+.*' # release branch @@ -55,6 +55,12 @@ jobs: run: unzip /root/thirdparties-bin.zip -d ./rdsn/thirdparty - name: Compilation run: ./run.sh build -c --skip_thirdparty + - + name: Packaging Server + run: ./run.sh pack_server + - + name: Packaging Tools + run: ./run.sh pack_tools - name: Unit Testing run: | source ./config_hdfs.sh diff --git a/scripts/pack_common.sh b/scripts/pack_common.sh index 48d3221..7d60397 100755 --- a/scripts/pack_common.sh +++ b/scripts/pack_common.sh @@ -100,12 +100,22 @@ function check_bit() fi } -function pack_system_lib() -{ +function need_system_lib() { + # return if system libname is not empty, if false, it means this library is not a dependency + libname=$(ldd ./DSN_ROOT/bin/pegasus_"$1"/pegasus_"$1" 2>/dev/null | grep "lib${2}\.so") + [ -n "${libname}" ] +} + +function pack_system_lib() { local package_path=$1 local package_type=$2 local lib_name=$3 + if ! need_system_lib "${package_type}" "${lib_name}"; then + echo "ERROR: ${lib_name} is not a required dependency, skip packaging this lib" + return; + fi + SYS_LIB_PATH=$(get_system_lib "${package_type}" "${lib_name}") if [ -z "${SYS_LIB_PATH}" ]; then echo "ERROR: library ${lib_name} is missing on your system" --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
