Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing 6 changed files with 27 additions and 22 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -28,12 +28,13 @@ jobs:
env:
BUILD_DIR: ./pkg-build
CPACK_DIR: ./pkg-build/cpack_output
SYMS_DIR: ./pkg-build/syms
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/tagname-action
id: tag
- name: package
run: ./package/package.sh -b ${{ steps.tag.outputs.tag }}
run: ./package/package.sh -b ${{ steps.tag.outputs.tag }} -t RelWithDebInfo -r OFF -p ON -s TRUE
- name: output some vars
run: |
tar zcf ${{ env.CPACK_DIR }}/nebula-${{ steps.tag.outputs.tagnum }}.tar.gz --exclude=${{ env.BUILD_DIR }} ./*
@@ -46,6 +47,14 @@ jobs:
bucket: nebula-graph
asset-path: ${{ env.CPACK_DIR }}
target-path: package/${{ steps.tag.outputs.tagnum }}
- uses: ./.github/actions/upload-to-oss-action
with:
key-id: ${{ secrets.OSS_ID }}
key-secret: ${{ secrets.OSS_SECRET }}
endpoint: ${{ secrets.OSS_ENDPOINT }}
bucket: nebula-graph
asset-path: ${{ env.SYMS_DIR }}
target-path: package/${{ steps.tag.outputs.tagnum }}/symbols

docker_build:
name: docker-build
2 changes: 1 addition & 1 deletion docker/Dockerfile.graphd
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ COPY . /home/nebula/BUILD
ARG BRANCH=master

RUN cd /home/nebula/BUILD/package \
&& ./package.sh -n OFF -b ${BRANCH} -g OFF
&& ./package.sh -n OFF -b ${BRANCH} -t RelWithDebInfo -s TRUE

FROM centos:7

2 changes: 1 addition & 1 deletion docker/Dockerfile.metad
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ ARG BRANCH=master
COPY . /home/nebula/BUILD

RUN cd /home/nebula/BUILD/package \
&& ./package.sh -n OFF -b ${BRANCH}
&& ./package.sh -n OFF -b ${BRANCH} -t RelWithDebInfo -s TRUE

FROM centos:7

2 changes: 1 addition & 1 deletion docker/Dockerfile.storaged
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ ARG BRANCH=master
COPY . /home/nebula/BUILD

RUN cd /home/nebula/BUILD/package \
&& ./package.sh -n OFF -b ${BRANCH}
&& ./package.sh -n OFF -b ${BRANCH} -t RelWithDebInfo -s TRUE

FROM centos:7

2 changes: 1 addition & 1 deletion docker/Dockerfile.tools
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ ARG BRANCH=master
COPY . /home/nebula/BUILD

RUN cd /home/nebula/BUILD/package \
&& ./package.sh -n OFF -b ${BRANCH}
&& ./package.sh -n OFF -b ${BRANCH} -t RelWithDebInfo -r OFF -p ON -s TRUE

FROM centos:7

30 changes: 13 additions & 17 deletions package/package.sh
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@ jobs=$(nproc)
enable_compressed_debug_info=ON
dump_symbols=OFF
dump_syms_tool_dir=
system_name=

while getopts v:n:s:b:d:t:r:p:j: opt;
do
@@ -176,32 +177,27 @@ function _find_dump_syms_tool {

function dump_syms {
_find_dump_syms_tool
dump_syms=${dump_syms_tool_dir}/dump_syms

syms_dir=${build_dir}/syms/
syms_dir=${build_dir}/symbols/
rm -rf ${syms_dir} && mkdir -p ${syms_dir}

nebula_graphd=${build_dir}/bin/nebula-graphd
nebula_storaged=${build_dir}/bin/nebula-storaged
nebula_metad=${build_dir}/bin/nebula-metad
pack=`ls ${build_dir}/cpack_output/`
tmp=${pack#nebula-graph}
ver=${tmp%.*}

if ! (${dump_syms_tool_dir}/dump_syms ${nebula_graphd} > ${syms_dir}/nebula-graphd-${version}.sym); then
echo ">>> dump nebula-graphd symbols faild. <<<"
exit 1
fi
if ! (${dump_syms_tool_dir}/dump_syms ${nebula_storaged} > ${syms_dir}/nebula-storaged-${version}.sym); then
echo ">>> dump nebula-storaged symbols faild. <<<"
exit 1
fi
if ! (${dump_syms_tool_dir}/dump_syms ${nebula_metad} > ${syms_dir}/nebula-metad-${version}.sym); then
echo ">>> dump nebula-storaged symbols faild. <<<"
exit 1
fi
for bin in nebula-graphd nebula-storaged nebula-metad; do
if ! (${dump_syms} ${build_dir}/bin/${bin} > ${syms_dir}/${bin}${ver}.sym); then
echo ">>> dump ${bin} symbols faild. <<<"
exit 1
fi
done
}

# The main
build $version $enablesanitizer $static_sanitizer $build_type $branch
package $strip_enable
if [[ $dump_symbols == ON ]]; then
echo ">>> start dump symbols <<<"
dump_syms
fi
package $strip_enable

0 comments on commit 6f3652c

Please sign in to comment.