From 81f8f93deca1275d4ff337974197dfb97a63d016 Mon Sep 17 00:00:00 2001 From: Polyglot AI <293096396+polyglotAI-bot@users.noreply.github.com> Date: Mon, 24 Aug 2026 05:22:45 +0000 Subject: [PATCH] ci(linux): test against the supported ClickHouse server versions The Linux workflow started ClickHouse from ci/docker-compose.yml with a single pinned image (25.12-alpine), so the client was tested against one server version only. Add a `server-versions` job that runs the same unit-test suite against 25.8 and 26.3 (LTS), 26.5, 26.6 and 26.7 (stable), and `head` (nightly build of ClickHouse master). The job sets CLICKHOUSE_VERSION, which the compose file already honours; the compose default is unchanged and stays the fallback for local runs. The compiler axis is pinned to one canonical configuration (clang-18, OpenSSL on, ubuntu-24.04) in the new job, so the server-version axis does not multiply the existing build matrix. --- .github/workflows/linux.yml | 76 +++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index f372b446..5fc1591b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -144,3 +144,79 @@ jobs: - name: Test working-directory: ${{github.workspace}}/build/ut run: ./clickhouse-cpp-ut + + # Runs the same test suite against the supported ClickHouse server versions. + # The compiler axis is pinned to one canonical configuration here, so that + # the server-version axis does not multiply the build matrix above. + server-versions: + name: clickhouse-server ${{matrix.clickhouse-version}} + + strategy: + fail-fast: false + matrix: + clickhouse-version: + - '25.8' # LTS + - '26.3' # LTS + - '26.5' # Stable + - '26.6' # Stable + - '26.7' # Stable + - 'head' # nightly build of ClickHouse master + + runs-on: ubuntu-24.04 + + env: + CLICKHOUSE_VERSION: '${{matrix.clickhouse-version}}-alpine' + + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 100 + fetch-tags: true + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + cmake \ + clang-18 libc++-18-dev + + - name: Configure project + run: | + cmake \ + -D CMAKE_C_COMPILER=clang-18 \ + -D CMAKE_CXX_COMPILER=clang++-18 \ + -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ + -D CH_MAP_BOOL_TO_UINT8=OFF \ + -D BUILD_TESTS=ON \ + -D WITH_OPENSSL=ON \ + -S ${{github.workspace}} \ + -B ${{github.workspace}}/build + + - name: Build project + run: | + cmake \ + --build ${{github.workspace}}/build \ + --config ${{env.BUILD_TYPE}} \ + --target all + + - name: Start ClickHouse in Docker + uses: hoverkraft-tech/compose-action@v2.0.1 + with: + compose-file: ci/docker-compose.yml + down-flags: --volumes + + - name: Check if ClickHouse is available + run: | + for i in {1..60}; do + if curl -fsS http://localhost:8123/ > /dev/null; then + echo "ClickHouse is ready" + exit 0 + fi + sleep 1 + done + echo "ClickHouse failed to start" + exit 1 + + - name: Test + working-directory: ${{github.workspace}}/build/ut + run: ./clickhouse-cpp-ut