This is an automated email from the ASF dual-hosted git repository.

zhjwpku pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new e5b06390 fix(ci): pin CMake and fix Windows shared builds (#1149)
e5b06390 is described below

commit e5b0639038b3b42efc825d267dc5be9e7855c188
Author: Junwang Zhao <[email protected]>
AuthorDate: Thu Nov 19 19:50:18 2026 +0800

    fix(ci): pin CMake and fix Windows shared builds (#1149)
    
    Pin CMake to 4.4.5 across C++ build workflows to avoid the
    Boost.Locale configuration failure with CMake 4.5.
    
    Move Avro and Parquet reader/writer constructors out of line so
    Impl is complete when unique_ptr cleanup is instantiated.
---
 .github/workflows/cpp-linter.yml       | 15 ++++++++----
 .github/workflows/rc.yml               | 12 ++++++++++
 .github/workflows/sql_catalog_test.yml |  6 ++---
 .github/workflows/test.yml             | 44 ++++++++++++++++++++++++++++++++++
 src/iceberg/avro/avro_reader.cc        |  2 ++
 src/iceberg/avro/avro_reader.h         |  2 +-
 src/iceberg/avro/avro_writer.cc        |  2 ++
 src/iceberg/avro/avro_writer.h         |  2 +-
 src/iceberg/parquet/parquet_reader.cc  |  2 ++
 src/iceberg/parquet/parquet_reader.h   |  2 +-
 src/iceberg/parquet/parquet_writer.cc  |  2 ++
 src/iceberg/parquet/parquet_writer.h   |  2 +-
 12 files changed, 81 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/cpp-linter.yml b/.github/workflows/cpp-linter.yml
index 6c2a368d..07a33701 100644
--- a/.github/workflows/cpp-linter.yml
+++ b/.github/workflows/cpp-linter.yml
@@ -61,6 +61,17 @@ jobs:
         run: |
           sudo apt-get update
           sudo apt-get install -y libcurl4-openssl-dev libssl-dev 
libsqlite3-dev libpq-dev default-libmysqlclient-dev
+      - name: Set up Python
+        uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # 
v7.1.0
+        with:
+          python-version: '3.13'
+      # Arrow's bundled Boost.Locale 1.88.0 is incompatible with CMake 4.5.
+      - name: Pin CMake to 4.4.5
+        shell: bash
+        run: |
+          python -m pip install "cmake==4.4.5"
+          cmake --version
+          test "$(cmake --version | head -n 1)" = "cmake version 4.4.5"
       - name: Set up sccache
         uses: ./.github/actions/setup-sccache
         with:
@@ -87,10 +98,6 @@ jobs:
         with:
           key-prefix: sccache-cpp-linter-ubuntu
           job-status: ${{ job.status }}
-      - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # 
v7.1.0
-        if: github.event_name == 'pull_request'
-        with:
-          python-version: '3.13'
       - name: Install cpp-linter and clang tools
         if: github.event_name == 'pull_request'
         run: |
diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml
index 1af2b9b7..1c392037 100644
--- a/.github/workflows/rc.yml
+++ b/.github/workflows/rc.yml
@@ -106,6 +106,18 @@ jobs:
         shell: bash
         run: sudo apt-get update && sudo apt-get install -y 
libcurl4-openssl-dev libssl-dev
 
+      - name: Set up Python
+        uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # 
v7.1.0
+        with:
+          python-version: '3.13'
+      # Arrow's bundled Boost.Locale 1.88.0 is incompatible with CMake 4.5.
+      - name: Pin CMake to 4.4.5
+        shell: bash
+        run: |
+          python -m pip install "cmake==4.4.5"
+          cmake --version
+          test "$(cmake --version | head -n 1)" = "cmake version 4.4.5"
+
       - name: Verify
         run: |
           tar_gz=$(echo apache-iceberg-cpp-*.tar.gz)
diff --git a/.github/workflows/sql_catalog_test.yml 
b/.github/workflows/sql_catalog_test.yml
index 8b4d43fa..c932afef 100644
--- a/.github/workflows/sql_catalog_test.yml
+++ b/.github/workflows/sql_catalog_test.yml
@@ -102,14 +102,12 @@ jobs:
         shell: pwsh
         run: |
           vcpkg install zlib:x64-windows nlohmann-json:x64-windows 
nanoarrow:x64-windows roaring:x64-windows sqlite3:x64-windows 
openssl:x64-windows
-      - name: Set up Python on Windows
-        if: ${{ startsWith(matrix.runs-on, 'windows') }}
+      - name: Set up Python
         uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # 
v7.1.0
         with:
           python-version: '3.13'
       # CMake 4.5 rejects bundled Boost.Locale's source_group tree.
-      - name: Pin CMake to 4.4.5 on Windows
-        if: ${{ startsWith(matrix.runs-on, 'windows') }}
+      - name: Pin CMake to 4.4.5
         shell: bash
         run: |
           python -m pip install "cmake==4.4.5"
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 0b32948b..41b567af 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -71,6 +71,17 @@ jobs:
       - name: Install dependencies
         shell: bash
         run: sudo apt-get update && sudo apt-get install -y 
libcurl4-openssl-dev libssl-dev
+      - name: Set up Python
+        uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # 
v7.1.0
+        with:
+          python-version: '3.13'
+      # Arrow's bundled Boost.Locale 1.88.0 is incompatible with CMake 4.5.
+      - name: Pin CMake to 4.4.5
+        shell: bash
+        run: |
+          python -m pip install "cmake==4.4.5"
+          cmake --version
+          test "$(cmake --version | head -n 1)" = "cmake version 4.4.5"
       - name: Set up sccache
         uses: ./.github/actions/setup-sccache
         with:
@@ -136,6 +147,17 @@ jobs:
       - name: Install dependencies
         shell: bash
         run: sudo apt-get update && sudo apt-get install -y 
libcurl4-openssl-dev libssl-dev
+      - name: Set up Python
+        uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # 
v7.1.0
+        with:
+          python-version: '3.13'
+      # Arrow's bundled Boost.Locale 1.88.0 is incompatible with CMake 4.5.
+      - name: Pin CMake to 4.4.5
+        shell: bash
+        run: |
+          python -m pip install "cmake==4.4.5"
+          cmake --version
+          test "$(cmake --version | head -n 1)" = "cmake version 4.4.5"
       - name: Restore sccache cache
         uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # 
v6.1.0
         with:
@@ -177,6 +199,17 @@ jobs:
         uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 
v7.0.1
         with:
           persist-credentials: false
+      - name: Set up Python
+        uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # 
v7.1.0
+        with:
+          python-version: '3.13'
+      # Arrow's bundled Boost.Locale 1.88.0 is incompatible with CMake 4.5.
+      - name: Pin CMake to 4.4.5
+        shell: bash
+        run: |
+          python -m pip install "cmake==4.4.5"
+          cmake --version
+          test "$(cmake --version | head -n 1)" = "cmake version 4.4.5"
       - name: Set up sccache
         uses: ./.github/actions/setup-sccache
         with:
@@ -227,6 +260,17 @@ jobs:
         uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # 
v1.13.0
         with:
           arch: x64
+      - name: Set up Python
+        uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # 
v7.1.0
+        with:
+          python-version: '3.13'
+      # Arrow's bundled Boost.Locale 1.88.0 is incompatible with CMake 4.5.
+      - name: Pin CMake to 4.4.5
+        shell: bash
+        run: |
+          python -m pip install "cmake==4.4.5"
+          cmake --version
+          test "$(cmake --version | tr -d '\r' | head -n 1)" = "cmake version 
4.4.5"
       - name: Cache vcpkg packages
         uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
         id: vcpkg-cache
diff --git a/src/iceberg/avro/avro_reader.cc b/src/iceberg/avro/avro_reader.cc
index b8e8695a..06d536e7 100644
--- a/src/iceberg/avro/avro_reader.cc
+++ b/src/iceberg/avro/avro_reader.cc
@@ -506,6 +506,8 @@ class AvroReader::Impl {
   std::unique_ptr<ReadContext> context_;
 };
 
+AvroReader::AvroReader() noexcept = default;
+
 AvroReader::~AvroReader() = default;
 
 Result<std::optional<ArrowArray>> AvroReader::Next() { return impl_->Next(); }
diff --git a/src/iceberg/avro/avro_reader.h b/src/iceberg/avro/avro_reader.h
index c193d00c..4b6a5b73 100644
--- a/src/iceberg/avro/avro_reader.h
+++ b/src/iceberg/avro/avro_reader.h
@@ -30,7 +30,7 @@ namespace iceberg::avro {
 /// \brief A reader that reads ArrowArray from Avro files.
 class ICEBERG_BUNDLE_EXPORT AvroReader : public Reader {
  public:
-  AvroReader() = default;
+  AvroReader() noexcept;
 
   ~AvroReader() override;
 
diff --git a/src/iceberg/avro/avro_writer.cc b/src/iceberg/avro/avro_writer.cc
index 01d8cb3b..92e0cd2d 100644
--- a/src/iceberg/avro/avro_writer.cc
+++ b/src/iceberg/avro/avro_writer.cc
@@ -286,6 +286,8 @@ class AvroWriter::Impl {
   std::unique_ptr<AvroWriteBackend> backend_;
 };
 
+AvroWriter::AvroWriter() noexcept = default;
+
 AvroWriter::~AvroWriter() = default;
 
 Status AvroWriter::Write(ArrowArray* data) { return impl_->Write(data); }
diff --git a/src/iceberg/avro/avro_writer.h b/src/iceberg/avro/avro_writer.h
index af68fac4..4d2d09f7 100644
--- a/src/iceberg/avro/avro_writer.h
+++ b/src/iceberg/avro/avro_writer.h
@@ -30,7 +30,7 @@ namespace iceberg::avro {
 /// \brief A writer for serializing ArrowArray to Avro files.
 class ICEBERG_BUNDLE_EXPORT AvroWriter : public Writer {
  public:
-  AvroWriter() = default;
+  AvroWriter() noexcept;
 
   ~AvroWriter() override;
 
diff --git a/src/iceberg/parquet/parquet_reader.cc 
b/src/iceberg/parquet/parquet_reader.cc
index 47003305..42027f89 100644
--- a/src/iceberg/parquet/parquet_reader.cc
+++ b/src/iceberg/parquet/parquet_reader.cc
@@ -369,6 +369,8 @@ class ParquetReader::Impl {
   std::unique_ptr<ReadContext> context_;
 };
 
+ParquetReader::ParquetReader() noexcept = default;
+
 ParquetReader::~ParquetReader() = default;
 
 Result<std::optional<ArrowArray>> ParquetReader::Next() { return 
impl_->Next(); }
diff --git a/src/iceberg/parquet/parquet_reader.h 
b/src/iceberg/parquet/parquet_reader.h
index 3a8e57cf..cf3fbd92 100644
--- a/src/iceberg/parquet/parquet_reader.h
+++ b/src/iceberg/parquet/parquet_reader.h
@@ -30,7 +30,7 @@ namespace iceberg::parquet {
 /// \brief A reader that reads ArrowArray from Parquet files.
 class ICEBERG_BUNDLE_EXPORT ParquetReader : public Reader {
  public:
-  ParquetReader() = default;
+  ParquetReader() noexcept;
 
   ~ParquetReader() override;
 
diff --git a/src/iceberg/parquet/parquet_writer.cc 
b/src/iceberg/parquet/parquet_writer.cc
index 08c39413..356b7bb0 100644
--- a/src/iceberg/parquet/parquet_writer.cc
+++ b/src/iceberg/parquet/parquet_writer.cc
@@ -362,6 +362,8 @@ class ParquetWriter::Impl {
   std::unordered_map<int32_t, FieldMetrics> field_metrics_;
 };
 
+ParquetWriter::ParquetWriter() noexcept = default;
+
 ParquetWriter::~ParquetWriter() = default;
 
 Status ParquetWriter::Open(const WriterOptions& options) {
diff --git a/src/iceberg/parquet/parquet_writer.h 
b/src/iceberg/parquet/parquet_writer.h
index 562ffb80..30879db8 100644
--- a/src/iceberg/parquet/parquet_writer.h
+++ b/src/iceberg/parquet/parquet_writer.h
@@ -30,7 +30,7 @@ namespace iceberg::parquet {
 /// \brief A writer that writes ArrowArray to Parquet files.
 class ICEBERG_BUNDLE_EXPORT ParquetWriter : public Writer {
  public:
-  ParquetWriter() = default;
+  ParquetWriter() noexcept;
 
   ~ParquetWriter() override;
 

Reply via email to