Skip to content

Commit 7034625

Browse files
authored
Merge branch 'master' into rename_query_cache
2 parents 8c38cf9 + f806b2c commit 7034625

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+196
-177
lines changed

.github/workflows/merge_queue.yml

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -240,47 +240,9 @@ jobs:
240240
python3 -m praktika run 'Build (amd_binary)' --workflow "MergeQueueCI" --ci |& tee ./ci/tmp/job.log
241241
fi
242242
243-
unit_tests_binary:
244-
runs-on: [self-hosted, func-tester]
245-
needs: [config_workflow, build_amd_binary]
246-
if: ${{ !failure() && !cancelled() && !contains(fromJson(needs.config_workflow.outputs.data).cache_success_base64, 'VW5pdCB0ZXN0cyAoYmluYXJ5KQ==') }}
247-
name: "Unit tests (binary)"
248-
outputs:
249-
data: ${{ steps.run.outputs.DATA }}
250-
steps:
251-
- name: Checkout code
252-
uses: actions/checkout@v4
253-
with:
254-
ref: ${{ env.CHECKOUT_REF }}
255-
256-
- name: Prepare env script
257-
run: |
258-
rm -rf ./ci/tmp ./ci/tmp ./ci/tmp
259-
mkdir -p ./ci/tmp ./ci/tmp ./ci/tmp
260-
cat > ./ci/tmp/praktika_setup_env.sh << 'ENV_SETUP_SCRIPT_EOF'
261-
export PYTHONPATH=./ci:.:
262-
cat > ./ci/tmp/workflow_config_mergequeueci.json << 'EOF'
263-
${{ needs.config_workflow.outputs.data }}
264-
EOF
265-
cat > ./ci/tmp/workflow_status.json << 'EOF'
266-
${{ toJson(needs) }}
267-
EOF
268-
ENV_SETUP_SCRIPT_EOF
269-
270-
- name: Run
271-
id: run
272-
run: |
273-
. ./ci/tmp/praktika_setup_env.sh
274-
set -o pipefail
275-
if command -v ts &> /dev/null; then
276-
python3 -m praktika run 'Unit tests (binary)' --workflow "MergeQueueCI" --ci |& ts '[%Y-%m-%d %H:%M:%S]' | tee ./ci/tmp/job.log
277-
else
278-
python3 -m praktika run 'Unit tests (binary)' --workflow "MergeQueueCI" --ci |& tee ./ci/tmp/job.log
279-
fi
280-
281243
finish_workflow:
282244
runs-on: [self-hosted, style-checker-aarch64]
283-
needs: [config_workflow, dockers_build_arm, dockers_build_amd, style_check, fast_test, build_amd_binary, unit_tests_binary]
245+
needs: [config_workflow, dockers_build_arm, dockers_build_amd, style_check, fast_test, build_amd_binary]
284246
if: ${{ !cancelled() }}
285247
name: "Finish Workflow"
286248
outputs:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ macro (clickhouse_add_executable target)
510510

511511
get_target_property (type ${target} TYPE)
512512
if (${type} STREQUAL EXECUTABLE)
513-
# disabled for TSAN and gcc since libtsan.a provides overrides too
513+
# Disabled if memory tracking is disabled
514514
if (TARGET clickhouse_new_delete)
515515
# operator::new/delete for executables (MemoryTracker stuff)
516516
target_link_libraries (${target} PRIVATE clickhouse_new_delete)

PreLoad.cmake

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,9 @@ execute_process(COMMAND uname -m
6060
COMMAND_ERROR_IS_FATAL ANY
6161
)
6262

63-
# By default, prefer clang on Linux
63+
# We already prefer clang
6464
# But note, that you still may change the compiler with -DCMAKE_C_COMPILER/-DCMAKE_CXX_COMPILER.
65-
if (OS MATCHES "Linux"
66-
AND "$ENV{CC}" STREQUAL ""
65+
if ("$ENV{CC}" STREQUAL ""
6766
AND "$ENV{CXX}" STREQUAL ""
6867
AND NOT DEFINED CMAKE_C_COMPILER
6968
AND NOT DEFINED CMAKE_CXX_COMPILER)

ci/praktika/info.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ def sha(self):
2323
def pr_number(self):
2424
return self.env.PR_NUMBER
2525

26+
@property
27+
def linked_pr_number(self):
28+
"""
29+
PR associated with the merge commit for Push or Merge Queue workflow
30+
:return: PR number or 0 if not applicable or not found
31+
"""
32+
return self.env.LINKED_PR_NUMBER
33+
2634
@property
2735
def workflow_name(self):
2836
return self.env.WORKFLOW_NAME

ci/workflows/merge_queue.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
JobConfigs.style_check,
1313
JobConfigs.fast_test,
1414
*[job for job in JobConfigs.build_jobs if job.name == "Build (amd_binary)"],
15-
*[
16-
job
17-
for job in JobConfigs.unittest_jobs
18-
if job.name == JobNames.UNITTEST + " (binary)"
19-
],
15+
# *[
16+
# job
17+
# for job in JobConfigs.unittest_jobs
18+
# if job.name == JobNames.UNITTEST + " (binary)"
19+
# ],
2020
],
2121
artifacts=[
2222
*[

cmake/tools.cmake

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Compiler
22

3-
if (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
4-
message (FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER_ID} is not supported")
3+
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
4+
message (FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER_ID} is not supported. Please switch to Clang")
55
endif ()
66

77
# Print details to output
@@ -13,24 +13,9 @@ execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
1313
message (STATUS "Using compiler:\n${COMPILER_SELF_IDENTIFICATION}")
1414

1515
# Require minimum compiler versions
16-
set (CLANG_MINIMUM_VERSION 18)
17-
set (XCODE_MINIMUM_VERSION 12.0)
18-
set (APPLE_CLANG_MINIMUM_VERSION 12.0.0)
19-
20-
if (CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
21-
# (Experimental!) Specify "-DALLOW_APPLECLANG=ON" when running CMake configuration step, if you want to experiment with using it.
22-
if (NOT ALLOW_APPLECLANG AND NOT DEFINED ENV{ALLOW_APPLECLANG})
23-
message (FATAL_ERROR "Compilation with AppleClang is unsupported. Please use vanilla Clang, e.g. from Homebrew.")
24-
endif ()
25-
26-
# For a mapping between XCode / AppleClang / vanilla Clang versions, see https://en.wikipedia.org/wiki/Xcode
27-
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${APPLE_CLANG_MINIMUM_VERSION})
28-
message (FATAL_ERROR "Compilation with AppleClang version ${CMAKE_CXX_COMPILER_VERSION} is unsupported, the minimum required version is ${APPLE_CLANG_MINIMUM_VERSION} (Xcode ${XCODE_MINIMUM_VERSION}).")
29-
endif ()
30-
else ()
31-
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${CLANG_MINIMUM_VERSION})
32-
message (FATAL_ERROR "Compilation with Clang version ${CMAKE_CXX_COMPILER_VERSION} is unsupported, the minimum required version is ${CLANG_MINIMUM_VERSION}.")
33-
endif ()
16+
set (CLANG_MINIMUM_VERSION 19)
17+
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${CLANG_MINIMUM_VERSION})
18+
message (FATAL_ERROR "Compilation with Clang version ${CMAKE_CXX_COMPILER_VERSION} is unsupported, the minimum required version is ${CLANG_MINIMUM_VERSION}.")
3419
endif ()
3520

3621
string (REGEX MATCHALL "[0-9]+" COMPILER_VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})

cmake/warnings.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
1111

1212
# Control maximum size of stack frames. It can be important if the code is run in fibers with small stack size.
1313
# Only in release build because debug has too large stack frames.
14-
if ((NOT CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG") AND (NOT SANITIZE) AND (NOT CMAKE_CXX_COMPILER_ID MATCHES "AppleClang"))
14+
if ((NOT CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG") AND (NOT SANITIZE))
1515
add_warning(frame-larger-than=65536)
1616
endif ()
1717

docs/en/development/build-osx.md

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ ClickHouse can be compiled on macOS x86_64 (Intel) and arm64 (Apple Silicon) usi
1414

1515
As compiler, only Clang from homebrew is supported.
1616

17-
Building with Apple's XCode `apple-clang` is not recommended, it may break in arbitrary ways.
18-
1917
## Install Prerequisites {#install-prerequisites}
2018

2119
First install [Homebrew](https://brew.sh/).
@@ -24,16 +22,7 @@ Next, run:
2422

2523
``` bash
2624
brew update
27-
brew install ccache cmake ninja libtool gettext llvm gcc binutils grep findutils nasm
28-
```
29-
30-
For Apple XCode Clang (discouraged), install the latest [XCode](https://apps.apple.com/am/app/xcode/id497799835?mt=12) the from App Store.
31-
Open it at least once to accept the end-user license agreement and automatically install the required components.
32-
Then, make sure that the latest Command Line Tools are installed and selected in the system:
33-
34-
``` bash
35-
sudo rm -rf /Library/Developer/CommandLineTools
36-
sudo xcode-select --install
25+
brew install ccache cmake ninja libtool gettext llvm binutils grep findutils nasm
3726
```
3827

3928
:::note
@@ -43,30 +32,17 @@ For serious development on macOS, make sure that the source code is stored on a
4332

4433
## Build ClickHouse {#build-clickhouse}
4534

46-
To build using Homebrew's Clang compiler:
35+
To build you must use Homebrew's Clang compiler:
4736

4837
``` bash
4938
cd ClickHouse
5039
mkdir build
5140
export PATH=$(brew --prefix llvm)/bin:$PATH
52-
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=$(brew --prefix llvm)/bin/clang -DCMAKE_CXX_COMPILER=$(brew --prefix llvm)/bin/clang++ -S . -B build
41+
cmake -S . -B build
5342
cmake --build build
5443
# The resulting binary will be created at: build/programs/clickhouse
5544
```
5645

57-
To build using XCode native AppleClang compiler in XCode IDE (not recommended):
58-
59-
``` bash
60-
cd ClickHouse
61-
rm -rf build
62-
mkdir build
63-
cd build
64-
XCODE_IDE=1 ALLOW_APPLECLANG=1 cmake -G Xcode -DCMAKE_BUILD_TYPE=Debug -DENABLE_JEMALLOC=OFF ..
65-
cmake --open .
66-
# ...then, in XCode IDE select ALL_BUILD scheme and start the building process.
67-
# The resulting binary will be created at: ./programs/Debug/clickhouse
68-
```
69-
7046
## Caveats {#caveats}
7147

7248
If you intend to run `clickhouse-server`, make sure to increase the system's `maxfiles` variable.

docs/en/development/build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
4646

4747
For other Linux distributions, check if you can install any of LLVM's [prebuild packages](https://releases.llvm.org/download.html).
4848

49-
As of January 2025, Clang 18 or higher is required.
49+
As of March 2025, Clang 19 or higher is required.
5050
GCC or other compilers are not supported.
5151

5252
## Install the Rust compiler (optional) {#install-the-rust-compiler-optional}

docs/en/development/style.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ But other things being equal, cross-platform or portable code is preferred.
740740

741741
**2.** Language: C++20 (see the list of available [C++20 features](https://en.cppreference.com/w/cpp/compiler_support#C.2B.2B20_features)).
742742

743-
**3.** Compiler: `clang`. At the time of writing (July 2022), the code is compiled using clang version >= 12. (It can also be compiled using `gcc`, but it's untested and not suitable for production usage).
743+
**3.** Compiler: `clang`. At the time of writing (March 2025), the code is compiled using clang version >= 19.
744744

745745
The standard library is used (`libc++`).
746746

0 commit comments

Comments
 (0)