Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Commit

Permalink
Revert package modify (#1323)
Browse files Browse the repository at this point in the history
* Revert package.sh modify.

* Update pr workflow to clang10.

* rm linker.
  • Loading branch information
CPWstatic authored Aug 19, 2021
1 parent c397299 commit 09fac4d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ jobs:
- ubuntu2004
compiler:
- gcc-9.2
- clang-9
- clang-10
exclude:
- os: centos7
compiler: clang-9
compiler: clang-10
container:
image: vesoft/nebula-dev:${{ matrix.os }}
env:
TOOLSET_DIR: /opt/vesoft/toolset/clang/9.0.0
TOOLSET_DIR: /opt/vesoft/toolset/clang/10.0.0
CCACHE_DIR: /tmp/ccache/nebula-graph/${{ matrix.os }}-${{ matrix.compiler }}
CCACHE_MAXSIZE: 8G
volumes:
Expand Down Expand Up @@ -104,7 +104,6 @@ jobs:
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_TESTING=on \
-DENABLE_BUILD_STORAGE=on \
-DNEBULA_USE_LINKER=lld \
-B build
echo "::set-output name=j::10"
;;
Expand All @@ -119,7 +118,6 @@ jobs:
-DENABLE_ASAN=on \
-DENABLE_TESTING=on \
-DENABLE_BUILD_STORAGE=on \
-DNEBULA_USE_LINKER=lld \
-B build
echo "::set-output name=j::6"
;;
Expand Down
25 changes: 22 additions & 3 deletions package/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,35 @@ function package {
args=""
[[ $strip_enable == TRUE ]] && args="-D CPACK_STRIP_FILES=TRUE -D CPACK_RPM_SPEC_MORE_DEFINE="

if ! ( cpack --verbose $args ); then
sys_ver=""
pType="RPM"
if [[ -f "/etc/redhat-release" ]]; then
sys_name=$(< /etc/redhat-release cut -d ' ' -f1)
if [[ ${sys_name} == "CentOS" ]]; then
sys_ver=$(< /etc/redhat-release tr -dc '0-9.' | cut -d \. -f1)
sys_ver=.el${sys_ver}.x86_64
elif [[ ${sys_name} == "Fedora" ]]; then
sys_ver=$(< /etc/redhat-release cut -d ' ' -f3)
sys_ver=.fc${sys_ver}.x86_64
fi
pType="RPM"
elif [[ -f "/etc/lsb-release" ]]; then
sys_ver=$(< /etc/lsb-release grep DISTRIB_RELEASE | cut -d "=" -f 2 | sed 's/\.//')
sys_ver=.ubuntu${sys_ver}.amd64
pType="DEB"
fi

if ! ( cpack -G ${pType} --verbose $args ); then
echo ">>> package nebula failed <<<"
exit 1
else
# rename package file
outputDir=$build_dir/cpack_output
mkdir -p ${outputDir}
for pkg_name in $(ls ./*nebula*-${version}*); do
mv ${pkg_name} ${outputDir}/
echo "####### taget package file is ${outputDir}/${pkg_name}"
new_pkg_name=${pkg_name/\-Linux/${sys_ver}}
mv ${pkg_name} ${outputDir}/${new_pkg_name}
echo "####### taget package file is ${outputDir}/${new_pkg_name}"
done
fi

Expand Down

0 comments on commit 09fac4d

Please sign in to comment.