You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-09-11 08:50:45 +03:00
fix(ci): do not build debuginfo packages for RPMS, as it cost 40min of packaging time
This commit is contained in:
committed by
Leonid Fedorov
parent
873eeb172c
commit
83c2933039
@@ -442,7 +442,15 @@ construct_cmake_flags() {
|
||||
|
||||
if [[ $SCCACHE = true ]]; then
|
||||
warn "Use sccache"
|
||||
MDB_CMAKE_FLAGS+=(-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache)
|
||||
# Use full path to ensure sccache is found during RPM builds
|
||||
MDB_CMAKE_FLAGS+=(-DCMAKE_C_COMPILER_LAUNCHER=/usr/local/bin/sccache -DCMAKE_CXX_COMPILER_LAUNCHER=/usr/local/bin/sccache)
|
||||
|
||||
message "Sccache binary check:"
|
||||
ls -la /usr/local/bin/sccache || warn "sccache binary not found"
|
||||
/usr/local/bin/sccache --version || warn "sccache version failed"
|
||||
|
||||
message "Starting sccache server:"
|
||||
/usr/local/bin/sccache --start-server 2>&1 || warn "Failed to start sccache server"
|
||||
fi
|
||||
|
||||
if [[ $RUN_BENCHMARKS = true ]]; then
|
||||
@@ -531,7 +539,13 @@ build_package() {
|
||||
cd $MDB_SOURCE_PATH
|
||||
|
||||
if [[ $PKG_FORMAT == "rpm" ]]; then
|
||||
command="cmake ${MDB_CMAKE_FLAGS[@]} && make -j\$(nproc) package"
|
||||
message "Configuring cmake for RPM package"
|
||||
MDB_CMAKE_FLAGS+=(-DCPACK_PACKAGE_DIRECTORY=$MARIA_BUILD_PATH/..)
|
||||
|
||||
cmake "${MDB_CMAKE_FLAGS[@]}" -S"$MDB_SOURCE_PATH" -B"$MARIA_BUILD_PATH"
|
||||
check_errorcode
|
||||
message "Building RPM package"
|
||||
command="cmake --build \"$MARIA_BUILD_PATH\" -j$(nproc) --target package"
|
||||
else
|
||||
export DEBIAN_FRONTEND="noninteractive"
|
||||
export DEB_BUILD_OPTIONS="parallel=$(nproc)"
|
||||
@@ -827,7 +841,8 @@ if [[ $BUILD_PACKAGES = true ]]; then
|
||||
exit_code=$?
|
||||
|
||||
if [[ $SCCACHE = true ]]; then
|
||||
sccache --show-adv-stats
|
||||
message "Final sccache statistics:"
|
||||
/usr/local/bin/sccache --show-adv-stats
|
||||
fi
|
||||
|
||||
exit $exit_code
|
||||
|
@@ -28,6 +28,27 @@ macro(columnstore_add_rpm_deps)
|
||||
columnstore_append_for_cpack(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES ${ARGN})
|
||||
endmacro()
|
||||
|
||||
if(RPM)
|
||||
# Columnstore-specific RPM packaging overrides 1) Use fast compression to speed up packaging
|
||||
set(CPACK_RPM_COMPRESSION_TYPE
|
||||
"zstd"
|
||||
CACHE STRING "RPM payload compression" FORCE
|
||||
)
|
||||
# 2) Disable debuginfo/debugsource to avoid slow packaging and duplicate file warnings
|
||||
set(CPACK_RPM_DEBUGINFO_PACKAGE
|
||||
OFF
|
||||
CACHE BOOL "Disable debuginfo package" FORCE
|
||||
)
|
||||
set(CPACK_RPM_PACKAGE_DEBUG
|
||||
0
|
||||
CACHE STRING "Disable RPM debug package" FORCE
|
||||
)
|
||||
unset(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX CACHE)
|
||||
|
||||
# Ensure our overrides are applied by CPack at packaging time CPACK_PROJECT_CONFIG_FILE is included by cpack after
|
||||
# CPackConfig.cmake is loaded
|
||||
set(CPACK_PROJECT_CONFIG_FILE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/cpack_overrides.cmake"
|
||||
CACHE FILEPATH "Columnstore CPack overrides" FORCE
|
||||
)
|
||||
|
||||
columnstore_add_rpm_deps("snappy" "jemalloc" "procps-ng" "gawk")
|
||||
endif()
|
||||
|
31
cmake/cpack_overrides.cmake
Normal file
31
cmake/cpack_overrides.cmake
Normal file
@@ -0,0 +1,31 @@
|
||||
# Columnstore-specific CPack overrides applied at package time
|
||||
# This file is referenced via CPACK_PROJECT_CONFIG_FILE and is included by CPack
|
||||
# after it reads the generated CPackConfig.cmake, letting these settings win.
|
||||
|
||||
# Faster payload compression
|
||||
set(CPACK_RPM_COMPRESSION_TYPE "zstd")
|
||||
|
||||
# Control debuginfo generation (symbols) without debugsource (sources)
|
||||
option(CS_RPM_DEBUGINFO "Build Columnstore -debuginfo RPM (symbols only)" OFF)
|
||||
|
||||
if(CS_RPM_DEBUGINFO)
|
||||
# Generate debuginfo RPM (symbols)
|
||||
set(CPACK_RPM_DEBUGINFO_PACKAGE ON)
|
||||
set(CPACK_RPM_PACKAGE_DEBUG 1)
|
||||
else()
|
||||
# No debuginfo RPM
|
||||
set(CPACK_RPM_DEBUGINFO_PACKAGE OFF)
|
||||
set(CPACK_RPM_PACKAGE_DEBUG 0)
|
||||
set(CPACK_STRIP_FILES OFF)
|
||||
# Prevent rpmbuild from stripping binaries and running debug post scripts.
|
||||
# CPACK_STRIP_FILES only affects CPack's own stripping; rpmbuild still
|
||||
# executes brp-strip and find-debuginfo by default unless we override macros.
|
||||
if(DEFINED CPACK_RPM_SPEC_MORE_DEFINE)
|
||||
set(CPACK_RPM_SPEC_MORE_DEFINE "${CPACK_RPM_SPEC_MORE_DEFINE}\n%define __strip /bin/true\n%define __objdump /bin/true\n%define __os_install_post %nil\n%define __debug_install_post %nil")
|
||||
else()
|
||||
set(CPACK_RPM_SPEC_MORE_DEFINE "%define __strip /bin/true\n%define __objdump /bin/true\n%define __os_install_post %nil\n%define __debug_install_post %nil")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Always disable debugsource by not mapping sources
|
||||
unset(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX)
|
Reference in New Issue
Block a user