Skip to content

Commit bea6fe3

Browse files
authored
Fix package script (vesoft-inc#2502)
* Fix package script * nightly build * Fix cmake module path
1 parent 6a683d5 commit bea6fe3

File tree

4 files changed

+8
-63
lines changed

4 files changed

+8
-63
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<br>A distributed, scalable, lightning-fast graph database<br>
55
</p>
66
<p align="center">
7-
<a href="https://github.com/vesoft-inc/nebula/actions?workflow=docker">
8-
<img src="https://github.com/vesoft-inc/nebula/workflows/docker/badge.svg" alt="build docker image workflow"/>
7+
<a href="https://github.com/vesoft-inc/nebula/actions?workflow=nightly">
8+
<img src="https://github.com/vesoft-inc/nebula/workflows/nightly/badge.svg" alt="nightly build"/>
99
</a>
1010
<a href="http://githubbadges.com/star.svg?user=vesoft-inc&repo=nebula&style=default">
1111
<img src="http://githubbadges.com/star.svg?user=vesoft-inc&repo=nebula&style=default" alt="nebula star"/>

cmake/ThriftGenerate.cmake

-6
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,6 @@ set_target_properties(
121121

122122
target_compile_options(${file_name}_thrift_obj PRIVATE "-Wno-pedantic")
123123
target_compile_options(${file_name}_thrift_obj PRIVATE "-Wno-extra")
124-
export(
125-
TARGETS "${file_name}_thrift_obj"
126-
NAMESPACE "common_"
127-
APPEND
128-
FILE ${CMAKE_BINARY_DIR}/${PACKAGE_NAME}-config.cmake
129-
)
130124

131125
if(NOT "${file_name}" STREQUAL "common")
132126
add_dependencies(

package/CMakeLists.txt

+1-15
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ cmake_minimum_required(VERSION 3.5.0)
1818
# Set the project name
1919
project("Nebula Package")
2020

21-
OPTION(ENABLE_PACKAGE_STORAGE "Whether package storage." ON)
22-
23-
list(APPEND CMAKE_MODULE_PATH "${CMAKE_BINARY_DIR}/../cmake")
21+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
2422

2523
message(STATUS "CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")
2624

@@ -35,8 +33,6 @@ endif()
3533
message(STATUS "NEBULA_SOURCE_DIR : ${NEBULA_SOURCE_DIR}")
3634
message(STATUS "NEBULA_BINARY_DIR : ${NEBULA_BINARY_DIR}")
3735

38-
if(ENABLE_PACKAGE_STORAGE)
39-
4036
install(
4137
FILES
4238
${NEBULA_BINARY_DIR}/bin/nebula-storaged
@@ -63,8 +59,6 @@ install(
6359
meta
6460
)
6561

66-
endif()
67-
6862
install(
6963
FILES
7064
${NEBULA_BINARY_DIR}/bin/nebula-graphd
@@ -78,8 +72,6 @@ install(
7872
graph
7973
)
8074

81-
if(ENABLE_PACKAGE_STORAGE)
82-
8375
install(
8476
FILES
8577
${NEBULA_BINARY_DIR}/bin/db_dump
@@ -148,8 +140,6 @@ install(
148140
meta
149141
)
150142

151-
endif()
152-
153143
install(
154144
FILES
155145
${NEBULA_SOURCE_DIR}/conf/nebula-graphd.conf.default
@@ -164,8 +154,6 @@ install(
164154
graph
165155
)
166156

167-
if(ENABLE_PACKAGE_STORAGE)
168-
169157
install(
170158
FILES
171159
${NEBULA_SOURCE_DIR}/scripts/nebula-storaged.service
@@ -192,8 +180,6 @@ install(
192180
meta
193181
)
194182

195-
endif()
196-
197183
install(
198184
FILES
199185
${NEBULA_SOURCE_DIR}/scripts/nebula-graphd.service

package/package.sh

+5-40
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,23 @@
44
#
55
# introduce the args
66
# -v: The version of package, the version should be match tag name, default value is the `commitId`
7-
# -n: Package to one or multi packages, `ON` means one package, `OFF` means multi packages, default value is `ON`
7+
# -n: Package to one or multi-packages, `ON` means one package, `OFF` means multi packages, default value is `ON`
88
# -s: Whether to strip the package, default value is `FALSE`
9-
# -g: Whether build storage, default is ON
9+
# -b: Branch, default master
10+
# -d: Whether to enable sanitizer, default OFF
11+
# -t: Build type, default Release
1012
#
11-
# usage: ./package.sh -v <version> -n <ON/OFF> -s <TRUE/FALSE> -b <BRANCH> -g <ON/OFF>
13+
# usage: ./package.sh -v <version> -n <ON/OFF> -s <TRUE/FALSE> -b <BRANCH>
1214
#
1315

1416
set -e
1517

1618
version=""
17-
build_storage=ON
1819
package_one=ON
1920
strip_enable="FALSE"
2021
usage="Usage: ${0} -v <version> -n <ON/OFF> -s <TRUE/FALSE> -b <BRANCH> -g <ON/OFF>"
2122
project_dir="$(cd "$(dirname "$0")" && pwd)/.."
2223
build_dir=${project_dir}/pkg-build
23-
modules_dir=${project_dir}/modules
24-
storage_dir=${modules_dir}/storage
25-
storage_build_dir=${build_dir}/modules/storage
2624
enablesanitizer="OFF"
2725
static_sanitizer="OFF"
2826
build_type="Release"
@@ -54,9 +52,6 @@ do
5452
t)
5553
build_type=$OPTARG
5654
;;
57-
g)
58-
build_storage=$OPTARG
59-
;;
6055
?)
6156
echo "Invalid option, use default arguments"
6257
;;
@@ -83,31 +78,6 @@ fi
8378

8479
echo "current version is [ $version ], strip enable is [$strip_enable], enablesanitizer is [$enablesanitizer], static_sanitizer is [$static_sanitizer]"
8580

86-
function _build_storage {
87-
if [[ ! -d ${storage_dir} && ! -L ${storage_dir} ]]; then
88-
git clone --single-branch --branch ${branch} https://github.com/vesoft-inc/nebula-storage.git ${storage_dir}
89-
fi
90-
91-
pushd ${storage_build_dir}
92-
cmake -DCMAKE_BUILD_TYPE=${build_type} \
93-
-DNEBULA_BUILD_VERSION=${version} \
94-
-DENABLE_ASAN=${san} \
95-
-DENABLE_UBSAN=${san} \
96-
-DENABLE_STATIC_ASAN=${ssan} \
97-
-DENABLE_STATIC_UBSAN=${ssan} \
98-
-DCMAKE_INSTALL_PREFIX=/usr/local/nebula \
99-
-DENABLE_TESTING=OFF \
100-
-DENABLE_PACK_ONE=${package_one} \
101-
${storage_dir}
102-
103-
if ! ( make -j ${jobs} ); then
104-
echo ">>> build nebula storage failed <<<"
105-
exit 1
106-
fi
107-
popd
108-
echo ">>> build nebula storage successfully <<<"
109-
}
110-
11181
function _build_graph {
11282
pushd ${build_dir}
11383
cmake -DCMAKE_BUILD_TYPE=${build_type} \
@@ -139,10 +109,6 @@ function build {
139109

140110
rm -rf ${build_dir} && mkdir -p ${build_dir}
141111

142-
if [[ "$build_storage" == "ON" ]]; then
143-
mkdir -p ${storage_build_dir}
144-
_build_storage
145-
fi
146112
_build_graph
147113
}
148114

@@ -160,7 +126,6 @@ function package {
160126
-DNEBULA_BUILD_VERSION=${version} \
161127
-DENABLE_PACK_ONE=${package_one} \
162128
-DCMAKE_INSTALL_PREFIX=/usr/local/nebula \
163-
-DENABLE_PACKAGE_STORAGE=${build_storage} \
164129
${project_dir}/package/
165130

166131
strip_enable=$1

0 commit comments

Comments
 (0)