summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author冯伟浩 <[email protected]>2020-09-23 16:51:21 +0800
committer冯伟浩 <[email protected]>2020-09-23 16:51:21 +0800
commit43e88b2a34b1ad28835a7bc95b3c4c2e637bcdb3 (patch)
tree09e3f23c4aadcfc25e01e563b68525a91592af1c
parent87fcacf83b40028adb4c8cfa27d5097583ba4381 (diff)
parentf1051e77b472e918c3ce1f90e477255442639ebc (diff)
Merge branch 'develop-for-ci' into 'develop-certstore-v2.0'v2.1.2-20200923
certstore上传yum仓库 See merge request tango/certstore!2
-rw-r--r--.gitlab-ci.yml49
-rw-r--r--ci/travis.sh17
-rw-r--r--program/CMakeLists.txt1
-rw-r--r--vendor/CMakeLists.txt16
-rw-r--r--vendor/gperftools-2.7.tar.gzbin0 -> 1523562 bytes
5 files changed, 49 insertions, 34 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index daaa239..6a045c4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,7 +3,7 @@ image: "git.mesalab.cn:7443/mesa_platform/build-env:master"
variables:
GIT_STRATEGY: "clone"
BUILD_PADDING_PREFIX: /tmp/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX/
- INSTALL_PREFIX: "/home/tsg/certstore"
+ INSTALL_PREFIX: "/opt/tsg/certstore"
TESTING_VERSION_BUILD: 0
stages:
@@ -18,6 +18,7 @@ stages:
script:
- yum makecache
- ./ci/travis.sh
+ - cd build
tags:
- share
@@ -27,8 +28,8 @@ branch_build_debug:
variables:
BUILD_TYPE: Debug
except:
- - /^develop-.*$/i
- - /^release-.*$/i
+ - /^develop.*$/i
+ - /^master.*$/i
- tags
branch_build_release:
@@ -37,54 +38,48 @@ branch_build_release:
BUILD_TYPE: RelWithDebInfo
extends: .build_by_travis
except:
- - /^develop-.*$/i
- - /^release-.*$/i
+ - /^develop.*$/i
+ - /^master.*$/i
- tags
develop_build_debug:
stage: build
extends: .build_by_travis
variables:
- TESTING_VERSION_BUILD: 1
- UPLOAD_SYMBOL_FILES: 1
BUILD_TYPE: Debug
PACKAGE: 1
- PULP3_REPO_NAME: certstore-testing-x86_64.el7
- PULP3_DIST_NAME: certstore-testing-x86_64.el7
artifacts:
name: "certstore-develop-$CI_COMMIT_REF_NAME-debug"
paths:
- build/*.rpm
only:
- - /^develop-.*$/i
- - /^release-.*$/i
+ - /^develop.*$/i
+ - /^master.*$/i
develop_build_release:
stage: build
extends: .build_by_travis
variables:
- TESTING_VERSION_BUILD: 1
- UPLOAD_SYMBOL_FILES: 1
BUILD_TYPE: RelWithDebInfo
PACKAGE: 1
- PULP3_REPO_NAME: certstore-testing-x86_64.el7
- PULP3_DIST_NAME: certstore-testing-x86_64.el7
artifacts:
name: "certstore-develop-$CI_COMMIT_REF_NAME-release"
paths:
- build/*.rpm
only:
- - /^develop-.*$/i
- - /^release-.*$/i
+ - /^develop.*$/i
+ - /^master.*$/i
-release_build_debug:
+
+release_build_release:
stage: build
variables:
- UPLOAD_SYMBOL_FILES: 1
- BUILD_TYPE: Debug
+ BUILD_TYPE: RelWithDebInfo
PACKAGE: 1
- PULP3_REPO_NAME: certstore-stable-x86_64.el7
- PULP3_DIST_NAME: certstore-stable-x86_64.el7
+ UPLOAD: 1
+ SYMBOL_TARGET: certstore-install
+ PULP3_REPO_NAME: tsg-stable-x86_64.el7
+ PULP3_DIST_NAME: tsg-stable-x86_64.el7
extends: .build_by_travis
artifacts:
name: "certstore-install-$CI_COMMIT_REF_NAME-debug"
@@ -93,14 +88,16 @@ release_build_debug:
only:
- tags
-release_build_release:
+release_build_release_devel:
stage: build
variables:
BUILD_TYPE: RelWithDebInfo
- UPLOAD_SYMBOL_FILES: 1
+ ENABLE_DEVEL_SWITCH: "ON"
PACKAGE: 1
- PULP3_REPO_NAME: certstore-stable-x86_64.el7
- PULP3_DIST_NAME: certstore-stable-x86_64.el7
+ UPLOAD: 1
+ SYMBOL_TARGET: certstore-install
+ PULP3_REPO_NAME: tsg-stable-x86_64.el7
+ PULP3_DIST_NAME: tsg-stable-x86_64.el7
extends: .build_by_travis
artifacts:
name: "certstore-install-$CI_COMMIT_REF_NAME-release"
diff --git a/ci/travis.sh b/ci/travis.sh
index 5bea103..2756f9a 100644
--- a/ci/travis.sh
+++ b/ci/travis.sh
@@ -43,20 +43,21 @@ cd build
cmake3 -DCMAKE_CXX_FLAGS=$CXX_FLAGS \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
- -DTFE_VERSION_DAILY_BUILD=$TESTING_VERSION_BUILD \
+ -DENABLE_DEVEL=$ENABLE_DEVEL_SWITCH \
..
make
-#make test
if [ -n "${PACKAGE}" ]; then
make package
- #cp ~/rpm_upload_tools.py ./
- #python3 rpm_upload_tools.py ${PULP3_REPO_NAME} ${PULP3_DIST_NAME} *.rpm
fi
-if [ -n "${UPLOAD_SYMBOL_FILES}" ]; then
- rpm -i certstore*debuginfo*.rpm
- #cp /usr/lib/debug/opt/tsg/tfe/bin/tfe.debug /tmp/tfe.debuginfo.${CI_COMMIT_SHORT_SHA}
- #sentry-cli upload-dif -t elf /tmp/tfe.debuginfo.${CI_COMMIT_SHORT_SHA}
+if [ -n "${UPLOAD}" ]; then
+ cp ~/rpm_upload_tools.py ./
+ python3 rpm_upload_tools.py ${PULP3_REPO_NAME} ${PULP3_DIST_NAME} *.rpm
+
+ rpm -i $SYMBOL_TARGET*debuginfo*.rpm
+ _symbol_file=`find /usr/lib/debug/ -name "$SYMBOL_TARGET*.debug"`
+ cp $_symbol_file ${_symbol_file}info.${CI_COMMIT_SHORT_SHA}
+ sentry-cli upload-dif -t elf ${_symbol_file}info.${CI_COMMIT_SHORT_SHA}
fi
diff --git a/program/CMakeLists.txt b/program/CMakeLists.txt
index c9fbd9a..55f86a6 100644
--- a/program/CMakeLists.txt
+++ b/program/CMakeLists.txt
@@ -19,4 +19,5 @@ target_link_libraries(certstore dl common
MESA_handle_logger
hiredis-static
MESA_field_stat
+ gperftools-static
${SYSTEMD_LIBRARIES})
diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt
index 4a60137..f23e99a 100644
--- a/vendor/CMakeLists.txt
+++ b/vendor/CMakeLists.txt
@@ -99,6 +99,22 @@ add_dependencies(gmock googletest)
set_property(TARGET gmock PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/libgmock.a)
set_property(TARGET gmock PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
+### gperftools
+ExternalProject_Add(gperftools
+ PREFIX gperftools
+ URL ${CMAKE_CURRENT_SOURCE_DIR}/gperftools-2.7.tar.gz
+ URL_MD5 c6a852a817e9160c79bdb2d3101b4601
+ CONFIGURE_COMMAND ./configure --prefix=<INSTALL_DIR> --disable-shared
+ BUILD_IN_SOURCE 1)
+
+ExternalProject_Get_Property(gperftools INSTALL_DIR)
+file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
+
+add_library(gperftools-static STATIC IMPORTED GLOBAL)
+add_dependencies(gperftools-static gperftools)
+set_property(TARGET gperftools-static PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/libtcmalloc.a)
+set_property(TARGET gperftools-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
+
### MESA Framework
# Consider the MESA Framework is installed in the system. We declare a imported target instead of
# ExternalProject target. we may retrive the MESAFramework source code from git.mesalab.cn and
diff --git a/vendor/gperftools-2.7.tar.gz b/vendor/gperftools-2.7.tar.gz
new file mode 100644
index 0000000..e0a82a2
--- /dev/null
+++ b/vendor/gperftools-2.7.tar.gz
Binary files differ