From 3993fe6b7ad5eb92a0a857cca1e68782faeb171b Mon Sep 17 00:00:00 2001 From: Junwang Zhao Date: Sat, 4 Jul 2026 18:13:28 +0800 Subject: [PATCH 1/3] ci: add RelWithDebInfo build to trigger a compile error --- .github/workflows/test.yml | 8 ++++++-- ci/scripts/build_iceberg.sh | 16 +++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 23fcc2d1c..f4eae604c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,11 +40,15 @@ env: jobs: ubuntu: if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} - name: AMD64 Ubuntu 26.04 + name: AMD64 Ubuntu 26.04 (${{ matrix.cmake_build_type }}) runs-on: ubuntu-26.04 timeout-minutes: 30 strategy: fail-fast: false + matrix: + cmake_build_type: + - Debug + - RelWithDebInfo env: SCCACHE_DIR: ${{ github.workspace }}/.sccache SCCACHE_CACHE_SIZE: "2G" @@ -70,7 +74,7 @@ jobs: env: CC: gcc-14 CXX: g++-14 - run: ci/scripts/build_iceberg.sh $(pwd) ON ON + run: ci/scripts/build_iceberg.sh $(pwd) ON ON OFF OFF ON ${{ matrix.cmake_build_type }} - name: Show sccache stats shell: bash run: sccache --show-stats diff --git a/ci/scripts/build_iceberg.sh b/ci/scripts/build_iceberg.sh index 6af0802f6..e00b6ca24 100755 --- a/ci/scripts/build_iceberg.sh +++ b/ci/scripts/build_iceberg.sh @@ -17,7 +17,7 @@ # specific language governing permissions and limitations # under the License. # -# Usage: build_iceberg.sh [rest_integration_tests=OFF] [sccache=OFF] [s3=OFF] [sigv4=OFF] [bundle_awssdk=ON] +# Usage: build_iceberg.sh [rest_integration_tests=OFF] [sccache=OFF] [s3=OFF] [sigv4=OFF] [bundle_awssdk=ON] [build_type=Debug] set -eux @@ -37,6 +37,12 @@ is_windows() { [[ "${OSTYPE}" == "msys" || "${OSTYPE}" == "win32" || "${OSTYPE}" == "cygwin" ]] } +if is_windows; then + build_type=${7:-Release} +else + build_type=${7:-Debug} +fi + CMAKE_ARGS=( "-G Ninja" "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX:-${ICEBERG_HOME}}" @@ -65,13 +71,13 @@ fi if is_windows; then CMAKE_ARGS+=("-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake") - CMAKE_ARGS+=("-DCMAKE_BUILD_TYPE=Release") + CMAKE_ARGS+=("-DCMAKE_BUILD_TYPE=${build_type}") else # Pass an externally provided toolchain (e.g. vcpkg for the SigV4 job) if [[ -n "${CMAKE_TOOLCHAIN_FILE:-}" ]]; then CMAKE_ARGS+=("-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}") fi - CMAKE_ARGS+=("-DCMAKE_BUILD_TYPE=Debug") + CMAKE_ARGS+=("-DCMAKE_BUILD_TYPE=${build_type}") fi if [[ "${build_enable_sccache}" == "ON" ]]; then @@ -86,9 +92,9 @@ fi cmake "${CMAKE_ARGS[@]}" ${source_dir} if is_windows; then - cmake --build . --config Release --target install + cmake --build . --config "${build_type}" --target install if [[ "${run_tests}" == "ON" ]]; then - ctest --output-on-failure -C Release + ctest --output-on-failure -C "${build_type}" fi else cmake --build . --target install From 9d5598cee315dac542c68e7fd596ae9374189f96 Mon Sep 17 00:00:00 2001 From: Junwang Zhao Date: Sat, 4 Jul 2026 19:29:19 +0800 Subject: [PATCH 2/3] fix: avoid GCC 14 refs parsing warning --- src/iceberg/json_serde.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/iceberg/json_serde.cc b/src/iceberg/json_serde.cc index 297265435..f322996ec 100644 --- a/src/iceberg/json_serde.cc +++ b/src/iceberg/json_serde.cc @@ -1377,9 +1377,9 @@ Result> TableMetadataFromJson(const nlohmann::jso TimePointMs{std::chrono::milliseconds(last_updated_ms)}; if (json.contains(kRefs)) { - ICEBERG_ASSIGN_OR_RAISE( - table_metadata->refs, - FromJsonMap>(json, kRefs, SnapshotRefFromJson)); + ICEBERG_ASSIGN_OR_RAISE(auto refs, FromJsonMap>( + json, kRefs, SnapshotRefFromJson)); + table_metadata->refs = std::move(refs); } else if (table_metadata->current_snapshot_id != kInvalidSnapshotId) { table_metadata->refs["main"] = std::make_unique(SnapshotRef{ .snapshot_id = table_metadata->current_snapshot_id, From c0906112f231ec0cc2dd7e99ee54d69a599b11ab Mon Sep 17 00:00:00 2001 From: Junwang Zhao Date: Sat, 4 Jul 2026 20:38:00 +0800 Subject: [PATCH 3/3] ci: separate Ubuntu sccache by build type --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f4eae604c..2ace2d4bd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,7 @@ jobs: if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} name: AMD64 Ubuntu 26.04 (${{ matrix.cmake_build_type }}) runs-on: ubuntu-26.04 - timeout-minutes: 30 + timeout-minutes: 60 strategy: fail-fast: false matrix: @@ -64,9 +64,9 @@ jobs: uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: ${{ github.workspace }}/.sccache - key: sccache-test-ubuntu-${{ github.run_id }} + key: sccache-test-ubuntu-${{ matrix.cmake_build_type }}-${{ github.run_id }} restore-keys: | - sccache-test-ubuntu- + sccache-test-ubuntu-${{ matrix.cmake_build_type }}- - name: Setup sccache uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10 - name: Build Iceberg @@ -83,7 +83,7 @@ jobs: uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: ${{ github.workspace }}/.sccache - key: sccache-test-ubuntu-${{ github.run_id }} + key: sccache-test-ubuntu-${{ matrix.cmake_build_type }}-${{ github.run_id }} - name: Build Example shell: bash env: