Continuous Integration (CI)
When you submit a pull request, some automated checks are ran for your code by the ClickHouse continuous integration (CI) system.
This happens after a repository maintainer (someone from ClickHouse team) has screened your code and added the can be tested
label to your pull request.
The results of the checks are listed on the GitHub pull request page as described in the GitHub checks documentation.
If a check is failing, you might be required to fix it.
This page gives an overview of checks you may encounter, and what you can do to fix them.
If it looks like the check failure is not related to your changes, it may be some transient failure or an infrastructure problem. Push an empty commit to the pull request to restart the CI checks:
If you are not sure what to do, ask a maintainer for help.
Merge with master
Verifies that the PR can be merged to master.
If not, it will fail with a message Cannot fetch mergecommit
.
To fix this check, resolve the conflict as described in the GitHub documentation, or merge the master
branch to your pull request branch using git.
Docs check
Tries to build the ClickHouse documentation website.
It can fail if you changed something in the documentation.
Most probable reason is that some cross-link in the documentation is wrong.
Go to the check report and look for ERROR
and WARNING
messages.
Description check
Check that the description of your pull request conforms to the template PULL_REQUEST_TEMPLATE.md. You have to specify a changelog category for your change (e.g., Bug Fix), and write a user-readable message describing the change for CHANGELOG.md
Push to DockerHub
Builds docker images used for build and tests, then pushes them to DockerHub.
Marker check
This check means that the CI system started to process the pull request. When it has 'pending' status, it means that not all checks have been started yet. After all checks have been started, it changes status to 'success'.
Style check
Performs various style checks on the code base.
Basic checks in the Style Check job:
cpp
Performs simple regex-based code style checks using the ci/jobs/scripts/check_style/check_cpp.sh
script (which can also be run locally).
If it fails, fix the style issues according to the code style guide.
codespell, aspell
Check for grammatical mistakes and typos.
mypy
Performs static type checking for Python code.
Running the style check job locally
The entire Style Check job can be run locally in a Docker container with:
To run a specific check (e.g., cpp check):
These commands pull the clickhouse/style-test
Docker image and run the job in a containerized environment.
No dependencies other than Python 3 and Docker are required.
Fast test
Normally this is the first check that is run for a PR. It builds ClickHouse and runs most of stateless functional tests, omitting some. If it fails, further checks are not started until it is fixed. Look at the report to see which tests fail, then reproduce the failure locally as described here.
Running fast test locally:
These commands pull the clickhouse/fast-test
Docker image and run the job in a containerized environment.
No dependencies other than Python 3 and Docker are required.
Build check
Builds ClickHouse in various configurations for use in further steps.
Running Builds Locally
The build can be run locally in a CI-like environment using:
No dependencies other than Python 3 and Docker are required.
Available Build Jobs
The build job names are exactly as they appear in the CI Report:
AMD64 Builds:
Build (amd_debug)
- Debug build with symbolsBuild (amd_release)
- Optimized release buildBuild (amd_asan)
- Address Sanitizer buildBuild (amd_tsan)
- Thread Sanitizer buildBuild (amd_msan)
- Memory Sanitizer buildBuild (amd_ubsan)
- Undefined Behavior Sanitizer buildBuild (amd_binary)
- Quick release build without Thin LTOBuild (amd_compat)
- Compatibility build for older systemsBuild (amd_musl)
- Build with musl libcBuild (amd_darwin)
- macOS buildBuild (amd_freebsd)
- FreeBSD build
ARM64 Builds:
Build (arm_release)
- ARM64 optimized release buildBuild (arm_asan)
- ARM64 Address Sanitizer buildBuild (arm_coverage)
- ARM64 build with coverage instrumentationBuild (arm_binary)
- ARM64 Quick release build without Thin LTOBuild (arm_darwin)
- macOS ARM64 buildBuild (arm_v80compat)
- ARMv8.0 compatibility build
Other Architectures:
Build (ppc64le)
- PowerPC 64-bit Little EndianBuild (riscv64)
- RISC-V 64-bitBuild (s390x)
- IBM System/390 64-bitBuild (loongarch64)
- LoongArch 64-bit
If the job succeeds, build results will be available in the <repo_root>/ci/tmp/build
directory.
Note: For builds not in the "Other Architectures" category (which use cross-compilation), your local machine architecture must match the build type to produce the build as requested by BUILD_JOB_NAME
.
Example
To run a local debug build: