From 81cd7dd1683b022a69221650869167266e5e5c81 Mon Sep 17 00:00:00 2001 From: FenjuFu <92919259+FenjuFu@users.noreply.github.com> Date: Tue, 10 Nov 2026 16:57:34 +0800 Subject: [PATCH] fix(ci): isolate example builds by C++ standard Signed-off-by: FenjuFu <92919259+FenjuFu@users.noreply.github.com> --- 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 c3972ee4b..3e3843ec5 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.