mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
Publish stripped binary
This commit is contained in:
parent
7a1c14ee49
commit
df24ef42b1
@ -1,3 +1,5 @@
|
|||||||
|
# Generates a separate file with debug symbols while stripping it from the main binary.
|
||||||
|
# This is needed for Debian packages.
|
||||||
macro(clickhouse_split_debug_symbols)
|
macro(clickhouse_split_debug_symbols)
|
||||||
set(oneValueArgs TARGET DESTINATION_DIR BINARY_PATH)
|
set(oneValueArgs TARGET DESTINATION_DIR BINARY_PATH)
|
||||||
|
|
||||||
|
@ -439,6 +439,13 @@ else()
|
|||||||
install (TARGETS clickhouse RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT clickhouse)
|
install (TARGETS clickhouse RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT clickhouse)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# A target to get stripped binary.
|
||||||
|
# Note: this is different to the above (extract debug symbols to a separate place)
|
||||||
|
add_custom_target(clickhouse-stripped
|
||||||
|
COMMAND "${STRIP_PATH}" -o "${CMAKE_CURRENT_BINARY_DIR}/clickhouse-stripped" --strip-debug --remove-section=.comment --remove-section=.note "${CMAKE_CURRENT_BINARY_DIR}/clickhouse"
|
||||||
|
DEPENDS clickhouse
|
||||||
|
COMMENT "Stripping clickhouse binary" VERBATIM)
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if (ENABLE_TESTS)
|
||||||
set (CLICKHOUSE_UNIT_TESTS_TARGETS unit_tests_dbms)
|
set (CLICKHOUSE_UNIT_TESTS_TARGETS unit_tests_dbms)
|
||||||
add_custom_target (clickhouse-tests ALL DEPENDS ${CLICKHOUSE_UNIT_TESTS_TARGETS})
|
add_custom_target (clickhouse-tests ALL DEPENDS ${CLICKHOUSE_UNIT_TESTS_TARGETS})
|
||||||
|
@ -11,8 +11,8 @@ else ()
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
add_custom_target (self-extracting ALL
|
add_custom_target (self-extracting ALL
|
||||||
${CMAKE_COMMAND} -E remove clickhouse
|
${CMAKE_COMMAND} -E remove clickhouse clickhouse-stripped
|
||||||
COMMAND ${COMPRESSOR} ${DECOMPRESSOR} clickhouse ../clickhouse
|
COMMAND ${COMPRESSOR} ${DECOMPRESSOR} clickhouse ../clickhouse
|
||||||
DEPENDS clickhouse compressor
|
COMMAND ${COMPRESSOR} ${DECOMPRESSOR} clickhouse-stripped ../clickhouse-stripped
|
||||||
|
DEPENDS clickhouse clickhouse-stripped compressor
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -212,10 +212,17 @@ def upload_master_static_binaries(
|
|||||||
elif pr_info.base_ref != "master":
|
elif pr_info.base_ref != "master":
|
||||||
return
|
return
|
||||||
|
|
||||||
s3_path = "/".join((pr_info.base_ref, static_binary_name, "clickhouse"))
|
# Full binary with debug info:
|
||||||
binary = build_output_path / "clickhouse"
|
s3_path_full = "/".join((pr_info.base_ref, static_binary_name, "clickhouse-full"))
|
||||||
url = s3_helper.upload_build_file_to_s3(binary, s3_path)
|
binary_full = build_output_path / "clickhouse"
|
||||||
print(f"::notice ::Binary static URL: {url}")
|
url_full = s3_helper.upload_build_file_to_s3(binary_full, s3_path_full)
|
||||||
|
print(f"::notice ::Binary static URL (with debug info): {url_full}")
|
||||||
|
|
||||||
|
# Stripped binary without debug info:
|
||||||
|
s3_path_compact = "/".join((pr_info.base_ref, static_binary_name, "clickhouse"))
|
||||||
|
binary_compact = build_output_path / "clickhouse-stripped"
|
||||||
|
url_compact = s3_helper.upload_build_file_to_s3(binary_compact, s3_path_compact)
|
||||||
|
print(f"::notice ::Binary static URL (compact): {url_compact}")
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
Loading…
Reference in New Issue
Block a user