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 1492e50b fix(ci): isolate example builds by C++ standard (#1106)
1492e50b is described below

commit 1492e50bfddd7b192bd061086ceb88eb143a25c8
Author: FenjuFu <[email protected]>
AuthorDate: Sat Nov 21 16:29:15 2026 +0800

    fix(ci): isolate example builds by C++ standard (#1106)
    
    The Windows C++20 and C++23 example steps reuse example/build. Give each 
standard a separate directory (build/cxx20 and build/cxx23) so the second build 
does not remove binaries from the first. Validate that the standard is numeric 
before using it in a directory name.
    
    Refs #1101; dependency downloads and sccache finalization are outside this 
change.
    
    Signed-off-by: FenjuFu <[email protected]>
---
 ci/scripts/build_example.sh | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/ci/scripts/build_example.sh b/ci/scripts/build_example.sh
index c3972ee4..3e3843ec 100755
--- a/ci/scripts/build_example.sh
+++ b/ci/scripts/build_example.sh
@@ -82,8 +82,17 @@ if [[ -z "${source_dir}" || -z "${build_type}" || -z 
"${cxx_standard}" ]]; then
     exit 2
 fi
 
+case "${cxx_standard}" in
+    *[!0-9]*)
+        echo "--cxx-standard must be numeric, got '${cxx_standard}'" >&2
+        exit 2
+        ;;
+esac
+
 set -x
-build_dir=${source_dir}/build
+# Keep successive C++ standard builds separate while Windows may still hold 
binaries.
+build_dir=${source_dir}/build/cxx${cxx_standard}
+mkdir -p "${source_dir}/build"
 
 # Clean up before configuring. If Windows still holds a just-built exe/dll
 # after the retries, let mkdir fail rather than reuse a half-deleted tree.

Reply via email to