Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f76af2f036 | ||
|
|
31bd3fed9c | ||
|
|
9ecf746f0f | ||
|
|
040ce55a1b | ||
|
|
cb4ad71c50 | ||
|
|
02100e4232 |
@@ -3,6 +3,7 @@ variables:
|
|||||||
GIT_STRATEGY: "clone"
|
GIT_STRATEGY: "clone"
|
||||||
BUILD_PADDING_PREFIX: /tmp/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX/
|
BUILD_PADDING_PREFIX: /tmp/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX/
|
||||||
INSTALL_PREFIX: "/opt/MESA/lib/"
|
INSTALL_PREFIX: "/opt/MESA/lib/"
|
||||||
|
INSTALL_DEPENDENCY_LIBRARY: ""
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
@@ -49,6 +50,10 @@ develop_build_debug:
|
|||||||
variables:
|
variables:
|
||||||
BUILD_TYPE: Debug
|
BUILD_TYPE: Debug
|
||||||
PACKAGE: 1
|
PACKAGE: 1
|
||||||
|
UPLOAD_RPM: 1
|
||||||
|
ASAN_OPTION: ADDRESS
|
||||||
|
PULP3_REPO_NAME: framework-testing-x86_64.el7
|
||||||
|
PULP3_DIST_NAME: framework-testing-x86_64.el7
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "MESA_handle_logger-$CI_COMMIT_REF_NAME-debug"
|
name: "MESA_handle_logger-$CI_COMMIT_REF_NAME-debug"
|
||||||
paths:
|
paths:
|
||||||
@@ -64,6 +69,10 @@ develop_build_release:
|
|||||||
variables:
|
variables:
|
||||||
BUILD_TYPE: RelWithDebInfo
|
BUILD_TYPE: RelWithDebInfo
|
||||||
PACKAGE: 1
|
PACKAGE: 1
|
||||||
|
UPLOAD_RPM: 1
|
||||||
|
ASAN_OPTION: "OFF"
|
||||||
|
PULP3_REPO_NAME: framework-testing-x86_64.el7
|
||||||
|
PULP3_DIST_NAME: framework-testing-x86_64.el7
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "MESA_handle_logger-$CI_COMMIT_REF_NAME-release"
|
name: "MESA_handle_logger-$CI_COMMIT_REF_NAME-release"
|
||||||
paths:
|
paths:
|
||||||
@@ -74,12 +83,30 @@ develop_build_release:
|
|||||||
- /^master.*$/i
|
- /^master.*$/i
|
||||||
|
|
||||||
|
|
||||||
|
release_build_debug:
|
||||||
|
stage: build
|
||||||
|
variables:
|
||||||
|
BUILD_TYPE: Debug
|
||||||
|
PACKAGE: 1
|
||||||
|
UPLOAD_RPM: 1
|
||||||
|
PULP3_REPO_NAME: framework-stable-x86_64.el7
|
||||||
|
PULP3_DIST_NAME: framework-stable-x86_64.el7
|
||||||
|
extends: .build_by_travis
|
||||||
|
artifacts:
|
||||||
|
name: "MESA_handle_logger-$CI_COMMIT_REF_NAME-release"
|
||||||
|
paths:
|
||||||
|
- build/*.rpm
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
|
||||||
release_build_release:
|
release_build_release:
|
||||||
stage: build
|
stage: build
|
||||||
variables:
|
variables:
|
||||||
BUILD_TYPE: RelWithDebInfo
|
BUILD_TYPE: RelWithDebInfo
|
||||||
PACKAGE: 1
|
PACKAGE: 1
|
||||||
UPLOAD: 1
|
UPLOAD_RPM: 1
|
||||||
|
UPLOAD_SYMBOL_FILES: 1
|
||||||
|
SYMBOL_TARGET: libMESA_handle_logger
|
||||||
PULP3_REPO_NAME: framework-stable-x86_64.el7
|
PULP3_REPO_NAME: framework-stable-x86_64.el7
|
||||||
PULP3_DIST_NAME: framework-stable-x86_64.el7
|
PULP3_DIST_NAME: framework-stable-x86_64.el7
|
||||||
extends: .build_by_travis
|
extends: .build_by_travis
|
||||||
@@ -88,58 +115,4 @@ release_build_release:
|
|||||||
paths:
|
paths:
|
||||||
- build/*.rpm
|
- build/*.rpm
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
except:
|
|
||||||
- /^v[0-9].*-testing$/i
|
|
||||||
|
|
||||||
release_build_release_devel:
|
|
||||||
stage: build
|
|
||||||
variables:
|
|
||||||
BUILD_TYPE: RelWithDebInfo
|
|
||||||
ENABLE_DEVEL_SWITCH: "ON"
|
|
||||||
PACKAGE: 1
|
|
||||||
UPLOAD: 1
|
|
||||||
PULP3_REPO_NAME: framework-stable-x86_64.el7
|
|
||||||
PULP3_DIST_NAME: framework-stable-x86_64.el7
|
|
||||||
extends: .build_by_travis
|
|
||||||
artifacts:
|
|
||||||
name: "MESA_handle_logger-$CI_COMMIT_REF_NAME-release"
|
|
||||||
paths:
|
|
||||||
- build/*.rpm
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
except:
|
|
||||||
- /^v[0-9].*-testing$/i
|
|
||||||
|
|
||||||
testing_build_release:
|
|
||||||
stage: build
|
|
||||||
variables:
|
|
||||||
BUILD_TYPE: RelWithDebInfo
|
|
||||||
PACKAGE: 1
|
|
||||||
UPLOAD: 1
|
|
||||||
PULP3_REPO_NAME: framework-testing-x86_64.el7
|
|
||||||
PULP3_DIST_NAME: framework-testing-x86_64.el7
|
|
||||||
extends: .build_by_travis
|
|
||||||
artifacts:
|
|
||||||
name: "MESA_handle_logger-$CI_COMMIT_REF_NAME-release"
|
|
||||||
paths:
|
|
||||||
- build/*.rpm
|
|
||||||
only:
|
|
||||||
- /^v[0-9].*-testing$/i
|
|
||||||
|
|
||||||
testing_build_release_devel:
|
|
||||||
stage: build
|
|
||||||
variables:
|
|
||||||
BUILD_TYPE: RelWithDebInfo
|
|
||||||
ENABLE_DEVEL_SWITCH: "ON"
|
|
||||||
PACKAGE: 1
|
|
||||||
UPLOAD: 1
|
|
||||||
PULP3_REPO_NAME: framework-testing-x86_64.el7
|
|
||||||
PULP3_DIST_NAME: framework-testing-x86_64.el7
|
|
||||||
extends: .build_by_travis
|
|
||||||
artifacts:
|
|
||||||
name: "MESA_handle_logger-$CI_COMMIT_REF_NAME-release"
|
|
||||||
paths:
|
|
||||||
- build/*.rpm
|
|
||||||
only:
|
|
||||||
- /^v[0-9].*-testing$/i
|
|
||||||
24
ci/travis.sh
24
ci/travis.sh
@@ -33,7 +33,14 @@ env | sort
|
|||||||
: "${COMPILER_IS_GNUCXX:=OFF}"
|
: "${COMPILER_IS_GNUCXX:=OFF}"
|
||||||
|
|
||||||
# Install dependency from YUM
|
# Install dependency from YUM
|
||||||
#yum install -y mrzcpd framework numactl-devel zlib-devel librdkafka-devel systemd-devel
|
if [ -n "${INSTALL_DEPENDENCY_LIBRARY}" ]; then
|
||||||
|
yum install -y $INSTALL_DEPENDENCY_LIBRARY
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $ASAN_OPTION ];then
|
||||||
|
source /opt/rh/devtoolset-7/enable
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir build || true
|
mkdir build || true
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
@@ -41,6 +48,8 @@ cmake3 -DCMAKE_CXX_FLAGS=$CXX_FLAGS \
|
|||||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||||
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
|
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
|
||||||
-DENABLE_DEVEL=$ENABLE_DEVEL_SWITCH \
|
-DENABLE_DEVEL=$ENABLE_DEVEL_SWITCH \
|
||||||
|
-DASAN_OPTION=$ASAN_OPTION \
|
||||||
|
-DVERSION_DAILY_BUILD=$TESTING_VERSION_BUILD \
|
||||||
..
|
..
|
||||||
|
|
||||||
make
|
make
|
||||||
@@ -49,13 +58,14 @@ if [ -n "${PACKAGE}" ]; then
|
|||||||
make package
|
make package
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${UPLOAD}" ]; then
|
if [ -n "${UPLOAD_RPM}" ]; then
|
||||||
cp ~/rpm_upload_tools.py ./
|
cp ~/rpm_upload_tools.py ./
|
||||||
python3 rpm_upload_tools.py ${PULP3_REPO_NAME} ${PULP3_DIST_NAME} *.rpm
|
python3 rpm_upload_tools.py ${PULP3_REPO_NAME} ${PULP3_DIST_NAME} *.rpm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#if [ -n "${UPLOAD_SYMBOL_FILES}" ]; then
|
if [ -n "${UPLOAD_SYMBOL_FILES}" ]; then
|
||||||
# rpm -i tfe*debuginfo*.rpm
|
rpm -i $SYMBOL_TARGET*debuginfo*.rpm
|
||||||
# cp /usr/lib/debug/opt/tsg/tfe/bin/tfe.debug /tmp/tfe.debuginfo.${CI_COMMIT_SHORT_SHA}
|
_symbol_file=`find /usr/lib/debug/ -name "$SYMBOL_TARGET*.so*.debug"`
|
||||||
# sentry-cli upload-dif -t elf /tmp/tfe.debuginfo.${CI_COMMIT_SHORT_SHA}
|
cp $_symbol_file ${_symbol_file}info.${CI_COMMIT_SHORT_SHA}
|
||||||
#fi
|
sentry-cli upload-dif -t elf ${_symbol_file}info.${CI_COMMIT_SHORT_SHA}
|
||||||
|
fi
|
||||||
@@ -156,7 +156,7 @@ static void snapshot_handle_info(const char *handle_name, const char *log_path,
|
|||||||
|
|
||||||
if(g_zlog_inited == 0)
|
if(g_zlog_inited == 0)
|
||||||
{
|
{
|
||||||
printf("[snapshot_handle_info], Nobody call MESA_handle_runtime_log_creation before, Using (%s) to init zlog, handle_name(%s), log_path(%s), log_level(%d)!!!\n", tmp_conf_filepath, handle_name, log_path, level);
|
fprintf(stderr,"[snapshot_handle_info], Nobody call MESA_handle_runtime_log_creation before, Using (%s) to init zlog, handle_name(%s), log_path(%s), log_level(%d)!!!\n", tmp_conf_filepath, handle_name, log_path, level);
|
||||||
zlog_init(tmp_conf_filepath);
|
zlog_init(tmp_conf_filepath);
|
||||||
zlog_reload(NULL);
|
zlog_reload(NULL);
|
||||||
}
|
}
|
||||||
@@ -193,7 +193,7 @@ void *MESA_create_runtime_log_handle(const char *file_path, int level)
|
|||||||
zc = zlog_get_category(p_name);
|
zc = zlog_get_category(p_name);
|
||||||
if (!zc)
|
if (!zc)
|
||||||
{
|
{
|
||||||
printf("[MESA_create_runtime_log_handle], get zlog category (%s) in global_conf_filepath(%s) fail\n", p_name, global_conf_filepath);
|
fprintf(stderr,"[MESA_create_runtime_log_handle], get zlog category (%s) in global_conf_filepath(%s) fail\n", p_name, global_conf_filepath);
|
||||||
}
|
}
|
||||||
p_handle = (log_handle_t *)calloc(sizeof(log_handle_t), 1);
|
p_handle = (log_handle_t *)calloc(sizeof(log_handle_t), 1);
|
||||||
strncpy(p_handle->runtime_log_file, file_path, sizeof(p_handle->runtime_log_file) - 1);
|
strncpy(p_handle->runtime_log_file, file_path, sizeof(p_handle->runtime_log_file) - 1);
|
||||||
@@ -237,11 +237,11 @@ int MESA_handle_runtime_log_creation(const char *conf_path)
|
|||||||
int rc = 0;
|
int rc = 0;
|
||||||
if (conf_path == NULL || (access(conf_path, R_OK) != 0))
|
if (conf_path == NULL || (access(conf_path, R_OK) != 0))
|
||||||
{
|
{
|
||||||
printf("[MESA_handle_runtime_log_creation], PATH (%s) unable to access, will output log to STDOUT or Using ZLOG_CONF_PATH (%s) !\n", conf_path, env);
|
fprintf(stderr,"[MESA_handle_runtime_log_creation], PATH (%s) unable to access, will output log to STDOUT or Using ZLOG_CONF_PATH (%s) !\n", conf_path, env);
|
||||||
rc = zlog_init(NULL);
|
rc = zlog_init(NULL);
|
||||||
if (rc)
|
if (rc)
|
||||||
{
|
{
|
||||||
printf("[MESA_handle_runtime_log_creation], INIT zlog by (NULL) or (%s) failed !!! \n", env);
|
fprintf(stderr,"[MESA_handle_runtime_log_creation], INIT zlog by (NULL) or (%s) failed !!! \n", env);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -257,11 +257,11 @@ int MESA_handle_runtime_log_creation(const char *conf_path)
|
|||||||
rc = zlog_init(conf_path);
|
rc = zlog_init(conf_path);
|
||||||
if (rc)
|
if (rc)
|
||||||
{
|
{
|
||||||
printf("[MESA_handle_runtime_log_creation], INIT zlog by (%s) failed , using [NULL] retry !\n", conf_path);
|
fprintf(stderr,"[MESA_handle_runtime_log_creation], INIT zlog by (%s) failed , using [NULL] retry !\n", conf_path);
|
||||||
rc = zlog_init(NULL);
|
rc = zlog_init(NULL);
|
||||||
if (rc)
|
if (rc)
|
||||||
{
|
{
|
||||||
printf("[MESA_handle_runtime_log_creation], INIT zlog by (NULL) or (%s) failed \n", env);
|
fprintf(stderr,"[MESA_handle_runtime_log_creation], INIT zlog by (NULL) or (%s) failed \n", env);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -279,7 +279,7 @@ int MESA_handle_runtime_log_creation(const char *conf_path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
printf("[MESA_handle_runtime_log_creation], INIT zlog finish, Using (%s). \n", global_conf_filepath);
|
fprintf(stderr,"[MESA_handle_runtime_log_creation], INIT zlog finish, Using (%s). \n", global_conf_filepath);
|
||||||
g_zlog_inited = 1;
|
g_zlog_inited = 1;
|
||||||
zlog_profile();
|
zlog_profile();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user