diff --git a/.github/workflows/ci-pull-request.yaml b/.github/workflows/ci-pull-request.yaml index 5bc0d5d061..d60ab024cd 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 48d3221b56..7d60397b59 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"