提交 5deb0e25 编写于 作者: wafwerar's avatar wafwerar

build: close default gtest compile and docker

上级 17d7ec98
...@@ -79,7 +79,7 @@ def pre_test(){ ...@@ -79,7 +79,7 @@ def pre_test(){
rm -rf debug rm -rf debug
mkdir debug mkdir debug
cd debug cd debug
cmake .. > /dev/null cmake .. -DBUILD_TEST=true > /dev/null
make -j4> /dev/null make -j4> /dev/null
''' '''
......
...@@ -173,7 +173,7 @@ def pre_test_build_mac() { ...@@ -173,7 +173,7 @@ def pre_test_build_mac() {
''' '''
sh ''' sh '''
cd ${WK}/debug cd ${WK}/debug
cmake .. cmake .. -DBUILD_TEST=true
make -j8 make -j8
''' '''
sh ''' sh '''
...@@ -302,7 +302,7 @@ def pre_test_build_win() { ...@@ -302,7 +302,7 @@ def pre_test_build_win() {
set CL=/MP8 set CL=/MP8
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> cmake" echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> cmake"
time /t time /t
cmake .. -G "NMake Makefiles JOM" || exit 7 cmake .. -G "NMake Makefiles JOM" -DBUILD_TEST=true || exit 7
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> jom -j 6" echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> jom -j 6"
time /t time /t
jom -j 6 || exit 8 jom -j 6 || exit 8
......
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
# Deps options # Deps options
# ========================================================= # =========================================================
option(
BUILD_TEST
"If build unit tests using googletest"
OFF
)
IF(${TD_WINDOWS}) IF(${TD_WINDOWS})
MESSAGE("build pthread Win32") MESSAGE("build pthread Win32")
...@@ -46,12 +52,6 @@ IF(${TD_WINDOWS}) ...@@ -46,12 +52,6 @@ IF(${TD_WINDOWS})
ON ON
) )
option(
BUILD_TEST
"If build unit tests using googletest"
ON
)
option( option(
TDENGINE_3 TDENGINE_3
"TDengine 3.x for taos-tools" "TDengine 3.x for taos-tools"
...@@ -65,28 +65,8 @@ IF(${TD_WINDOWS}) ...@@ -65,28 +65,8 @@ IF(${TD_WINDOWS})
) )
ELSEIF (TD_DARWIN_64) ELSEIF (TD_DARWIN_64)
IF(${BUILD_TEST})
add_definitions(-DCOMPILER_SUPPORTS_CXX13) add_definitions(-DCOMPILER_SUPPORTS_CXX13)
option(
BUILD_TEST
"If build unit tests using googletest"
ON
)
ELSE ()
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++13" COMPILER_SUPPORTS_CXX13)
IF(${COMPILER_SUPPORTS_CXX13})
add_definitions(-DCOMPILER_SUPPORTS_CXX13)
option(
BUILD_TEST
"If build unit tests using googletest"
ON
)
ELSE ()
option(
BUILD_TEST
"If build unit tests using googletest"
OFF
)
ENDIF () ENDIF ()
ENDIF () ENDIF ()
......
#!/bin/bash #!/bin/bash
set -e set -e
#set -x #set -x
set -v
# dockerbuild.sh # dockerbuild.sh
# -n [version number] # -n [version number]
...@@ -11,8 +12,9 @@ set -e ...@@ -11,8 +12,9 @@ set -e
version="" version=""
passWord="" passWord=""
verType="" verType=""
dockerLatest="n"
while getopts "hn:p:V:" arg while getopts "hn:p:V:a:" arg
do do
case $arg in case $arg in
n) n)
...@@ -30,8 +32,14 @@ do ...@@ -30,8 +32,14 @@ do
h) h)
echo "Usage: `basename $0` -n [version number] " echo "Usage: `basename $0` -n [version number] "
echo " -p [password for docker hub] " echo " -p [password for docker hub] "
echo " -V [stable |beta] "
echo " -a [y | n ] "
exit 0 exit 0
;; ;;
a)
#echo "dockerLatest=$OPTARG"
dockerLatest=$(echo $OPTARG)
;;
?) #unknow option ?) #unknow option
echo "unkonw argument" echo "unkonw argument"
exit 1 exit 1
...@@ -41,42 +49,55 @@ done ...@@ -41,42 +49,55 @@ done
echo "version=${version}" echo "version=${version}"
#docker manifest rm tdengine/tdengine if [ "$verType" == "stable" ]; then
#docker manifest rm tdengine/tdengine:${version} verType=stable
if [ "$verType" == "beta" ]; then dockerinput=TDengine-server-${version}-Linux-$cpuType.tar.gz
docker manifest create -a tdengine/tdengine-beta:${version} tdengine/tdengine-amd64-beta:${version} tdengine/tdengine-aarch64-beta:${version} tdengine/tdengine-aarch32-beta:${version} dockerinput_x64=TDengine-server-${version}-Linux-amd64.tar.gz
docker manifest create -a tdengine/tdengine-beta:latest tdengine/tdengine-amd64-beta:latest tdengine/tdengine-aarch64-beta:latest tdengine/tdengine-aarch32-beta:latest dockerim=tdengine/tdengine
docker manifest rm tdengine/tdengine-beta:${version} dockeramd64=tdengine/tdengine-amd64
docker manifest rm tdengine/tdengine-beta:latest dockeraarch64=tdengine/tdengine-aarch64
docker manifest create -a tdengine/tdengine-beta:${version} tdengine/tdengine-amd64-beta:${version} tdengine/tdengine-aarch64-beta:${version} tdengine/tdengine-aarch32-beta:${version} dockeraarch32=tdengine/tdengine-aarch32
docker manifest create -a tdengine/tdengine-beta:latest tdengine/tdengine-amd64-beta:latest tdengine/tdengine-aarch64-beta:latest tdengine/tdengine-aarch32-beta:latest elif [ "$verType" == "beta" ];then
docker manifest inspect tdengine/tdengine:latest verType=beta
docker manifest inspect tdengine/tdengine:${version} tagVal=ver-${version}-beta
docker login -u tdengine -p ${passWord} #replace the docker registry username and password dockerinput=TDengine-server-${version}-${verType}-Linux-$cpuType.tar.gz
docker manifest push tdengine/tdengine-beta:${version} dockerinput_x64=TDengine-server-${version}-${verType}-Linux-amd64.tar.gz
docker manifest push tdengine/tdengine-beta:latest dockerim=tdengine/tdengine-beta
elif [ "$verType" == "stable" ]; then dockeramd64=tdengine/tdengine-amd64-beta
docker manifest create -a tdengine/tdengine:${version} tdengine/tdengine-amd64:${version} tdengine/tdengine-aarch64:${version} tdengine/tdengine-aarch32:${version} dockeraarch64=tdengine/tdengine-aarch64-beta
docker manifest create -a tdengine/tdengine:latest tdengine/tdengine-amd64:latest tdengine/tdengine-aarch64:latest tdengine/tdengine-aarch32:latest dockeraarch32=tdengine/tdengine-aarch32-beta
docker manifest rm tdengine/tdengine:latest else
docker manifest rm tdengine/tdengine:${version}
docker manifest create -a tdengine/tdengine:${version} tdengine/tdengine-amd64:${version} tdengine/tdengine-aarch64:${version} tdengine/tdengine-aarch32:${version}
docker manifest create -a tdengine/tdengine:latest tdengine/tdengine-amd64:latest tdengine/tdengine-aarch64:latest tdengine/tdengine-aarch32:latest
docker manifest inspect tdengine/tdengine:latest
docker manifest inspect tdengine/tdengine:${version}
docker login -u tdengine -p ${passWord} #replace the docker registry username and password
docker manifest push tdengine/tdengine:${version}
docker manifest push tdengine/tdengine:latest
else
echo "unknow verType, nor stabel or beta" echo "unknow verType, nor stabel or beta"
exit 1 exit 1
fi fi
# docker manifest create -a tdengine/${dockername}:${version} tdengine/tdengine-amd64:${version} tdengine/tdengine-aarch64:${version} tdengine/tdengine-aarch32:${version} username="tdengine"
# docker manifest create -a tdengine/${dockername}:latest tdengine/tdengine-amd64:latest tdengine/tdengine-aarch64:latest tdengine/tdengine-aarch32:latest
# generate docker verison
echo "generate ${dockerim}:${version}"
docker manifest create -a ${dockerim}:${version} ${dockeramd64}:${version} ${dockeraarch64}:${version}
docker manifest inspect ${dockerim}:${version}
docker manifest rm ${dockerim}:${version}
docker manifest create -a ${dockerim}:${version} ${dockeramd64}:${version} ${dockeraarch64}:${version}
docker manifest inspect ${dockerim}:${version}
docker login -u ${username} -p ${passWord}
docker manifest push ${dockerim}:${version}
# docker login -u tdengine -p ${passWord} #replace the docker registry username and password # generate docker latest
echo "generate ${dockerim}:latest "
if [ ${dockerLatest} == 'y' ] ;then
echo "docker manifest create -a ${dockerim}:latest ${dockeramd64}:latest ${dockeraarch64}:latest"
docker manifest create -a ${dockerim}:latest ${dockeramd64}:latest ${dockeraarch64}:latest
docker manifest inspect ${dockerim}:latest
docker manifest rm ${dockerim}:latest
docker manifest create -a ${dockerim}:latest ${dockeramd64}:latest ${dockeraarch64}:latest
docker manifest inspect ${dockerim}:latest
docker login -u tdengine -p ${passWord} #replace the docker registry username and password
docker manifest push ${dockerim}:latest
docker pull tdengine/tdengine:latest
fi
# docker manifest push tdengine/tdengine:latest
# # how set latest version ???
...@@ -149,26 +149,4 @@ rm -rf temp1.data ...@@ -149,26 +149,4 @@ rm -rf temp1.data
if [ ${dockerLatest} == 'y' ] ;then if [ ${dockerLatest} == 'y' ] ;then
docker tag tdengine/tdengine-${dockername}:${version} tdengine/tdengine-${dockername}:latest docker tag tdengine/tdengine-${dockername}:${version} tdengine/tdengine-${dockername}:latest
docker push tdengine/tdengine-${dockername}:latest docker push tdengine/tdengine-${dockername}:latest
echo ">>>>>>>>>>>>> check whether tdengine/tdengine-${dockername}:latest has been published correctly"
docker run -d --name doctestla -p 7030-7049:6030-6049 -p 7030-7049:6030-6049/udp tdengine/tdengine-${dockername}:latest
sleep 2
curl -u root:taosdata -d 'show variables;' 127.0.0.1:7041/rest/sql > temp2.data
version_latest=` cat temp2.data |jq .data| jq '.[]' |grep "version" -A 2 -B 1 | jq ".[1]" `
echo "${version_latest}"
if [ "${version_latest}" == "\"${version}\"" ] ; then
echo "docker version is right "
else
echo "docker version is wrong "
exit 1
fi
fi
rm -rf temp2.data
if [ -n "$(docker ps -aq)" ] ;then
echo "delte docker process"
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
fi fi
cd ${scriptDir}
rm -f ${pkgFile}
...@@ -44,8 +44,6 @@ cmake ../../ -G "NMake Makefiles JOM" -DCMAKE_MAKE_PROGRAM=jom -DBUILD_TOOLS=tru ...@@ -44,8 +44,6 @@ cmake ../../ -G "NMake Makefiles JOM" -DCMAKE_MAKE_PROGRAM=jom -DBUILD_TOOLS=tru
cmake --build . cmake --build .
rd /s /Q C:\TDengine rd /s /Q C:\TDengine
cmake --install . cmake --install .
for /r c:\TDengine %%i in (*.dll) do signtool sign /f D:\\123.pfx /p taosdata %%i
for /r c:\TDengine %%i in (*.exe) do signtool sign /f D:\\123.pfx /p taosdata %%i
if not %errorlevel% == 0 ( call :RUNFAILED build x64 failed & exit /b 1) if not %errorlevel% == 0 ( call :RUNFAILED build x64 failed & exit /b 1)
cd %package_dir% cd %package_dir%
iscc /DMyAppInstallName="%packagServerName_x64%" /DMyAppVersion="%2" /DMyAppExcludeSource="" tools\tdengine.iss /O..\release iscc /DMyAppInstallName="%packagServerName_x64%" /DMyAppVersion="%2" /DMyAppExcludeSource="" tools\tdengine.iss /O..\release
...@@ -53,7 +51,6 @@ if not %errorlevel% == 0 ( call :RUNFAILED package %packagServerName_x64% faile ...@@ -53,7 +51,6 @@ if not %errorlevel% == 0 ( call :RUNFAILED package %packagServerName_x64% faile
iscc /DMyAppInstallName="%packagClientName_x64%" /DMyAppVersion="%2" /DMyAppExcludeSource="taosd.exe" tools\tdengine.iss /O..\release iscc /DMyAppInstallName="%packagClientName_x64%" /DMyAppVersion="%2" /DMyAppExcludeSource="taosd.exe" tools\tdengine.iss /O..\release
if not %errorlevel% == 0 ( call :RUNFAILED package %packagClientName_x64% failed & exit /b 1) if not %errorlevel% == 0 ( call :RUNFAILED package %packagClientName_x64% failed & exit /b 1)
for /r ..\release %%i in (*.exe) do signtool sign /f d:\\123.pfx /p taosdata %%i
goto EXIT0 goto EXIT0
:USAGE :USAGE
......
...@@ -15,6 +15,6 @@ target_include_directories( ...@@ -15,6 +15,6 @@ target_include_directories(
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
) )
if(${BUILD_TEST}) if(BUILD_TEST AND BUILD_SYNC_TEST)
add_subdirectory(test) add_subdirectory(test)
endif(${BUILD_TEST}) endif()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册