Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
13802a0
Refactor client-cpp build to single CMake entry with portable third-p…
hongzhi-gao May 20, 2026
3e3629d
Fix macOS client-cpp CI bison version and add source-build workflow
hongzhi-gao May 20, 2026
7696396
Fix client-cpp-source-build: install clang-format-17 on all runners
hongzhi-gao May 25, 2026
1037137
Skip Spotless in client-cpp-source-build; drop clang-format install
hongzhi-gao May 25, 2026
2f175f3
Refactor C++ client SDK: isolate Thrift and ship Windows DLL.
hongzhi-gao May 25, 2026
27fc230
fix(client-cpp): include ctime for std::tm in Common.h
hongzhi-gao May 26, 2026
25e5a48
fix(client-cpp): CMake 4 Thrift policy and Session.cpp cstring
hongzhi-gao May 26, 2026
5ce0b02
fix(client-cpp): Linux Thrift link and default Boost 1.84
hongzhi-gao May 26, 2026
3864b94
fix(client-cpp): Linux Thrift link and macOS Boost 1.84
hongzhi-gao May 26, 2026
75832c9
ci(client-cpp): multi-toolchain package matrix for release zips
hongzhi-gao May 26, 2026
26da433
fix(ci): write windows_matrix to GITHUB_OUTPUT without invalid format
hongzhi-gao May 26, 2026
c58826b
fix(ci): scope C++ triggers, glibc231 arm64, CentOS7 and VS2015 boost
hongzhi-gao May 26, 2026
213356a
fix(ci): docker-based glibc builds, CMake 3.28 on arm64, drop VS2015
hongzhi-gao May 26, 2026
0238f24
fix(client-cpp): flatten package zip name and layout
hongzhi-gao May 26, 2026
776f65a
fix(ci): pin CentOS7 SCLo repos to vault 7.9.2009 for glibc217
hongzhi-gao May 26, 2026
6226915
fix(ci): build glibc217 in manylinux2014 job container
hongzhi-gao May 26, 2026
f633f3b
fix(ci): host checkout + docker manylinux2014 for glibc217
hongzhi-gao May 26, 2026
8cacdb1
fix(ci): avoid SIGPIPE 141 from head/tail under pipefail
hongzhi-gao May 26, 2026
5b50e61
fix(client-cpp): force x64 for Visual Studio Windows packages
hongzhi-gao May 26, 2026
1e3cb7b
fix(ci): build linux-aarch64 glibc217 with manylinux2014
hongzhi-gao May 26, 2026
0b97892
fix(client-cpp): PR review follow-ups for SDK branch
hongzhi-gao May 26, 2026
2877b2d
chore(ci): slim manylinux glibc217 package path
hongzhi-gao May 27, 2026
31438de
refactor(client-cpp): rename IoTDBDate and move tests
hongzhi-gao May 27, 2026
252894a
example: merge C Session demos into client-cpp-example
hongzhi-gao May 27, 2026
a52c9a3
style(client-cpp): apply spotless to C examples
hongzhi-gao May 27, 2026
f744a14
fix(ci): use curl for downloads in manylinux glibc217 script
hongzhi-gao May 27, 2026
30c55e7
fix(ci): use curl directly in manylinux glibc217 script
hongzhi-gao May 27, 2026
3501aac
fix(client-cpp): centralize SessionConfig defaults and align fetchSiz…
hongzhi-gao May 27, 2026
ac4e1fa
ci(client-cpp): add glibc224 packages with explicit CXX11 ABI on many…
hongzhi-gao May 28, 2026
569ad3f
fix(client-cpp): correct glibc224 CXX11 ABI check and Maven flag wiring
hongzhi-gao May 28, 2026
6eda7b4
fix(client-cpp): use CMake ABI tag file instead of nm for glibc224 CI
hongzhi-gao May 28, 2026
fe4016d
ci(client-cpp): remove source-build workflow
hongzhi-gao May 29, 2026
16f3704
Merge upstream/master into refactor/cpp-client-sdk
hongzhi-gao May 29, 2026
275334f
fix(ci): harden glibc checks and drop removed source-build workflow refs
hongzhi-gao May 29, 2026
bfca828
fix(client-cpp): flatten package zip layout and add SHA512 checksums
hongzhi-gao Jun 1, 2026
f89b57f
fix sessionIT.cpp compilation
hongzhi-gao Jun 1, 2026
1ef2640
fix(client-cpp): download Catch2 at build time instead of vendoring
hongzhi-gao Jun 1, 2026
497d8da
fix(client-cpp): download Catch2 before CMake compile phase
hongzhi-gao Jun 1, 2026
2268a0a
feat: integrate cross-module refactors and client-cpp pooling updates
hongzhi-gao Jun 2, 2026
a52476f
refactor(client-cpp): move SessionPool implementation into session so…
hongzhi-gao Jun 2, 2026
175bbd0
refactor(client-cpp): ship SDK tarballs with cmake/pkgconfig and bund…
hongzhi-gao Jun 4, 2026
5d9e3af
fix(ci): normalize RUNNER_TEMP for Windows tar extract in cpp package…
hongzhi-gao Jun 4, 2026
6b4c108
chore(client-cpp): trim examples README and formatDatetime dead code
hongzhi-gao Jun 4, 2026
17a26a1
fix(ci): locate Windows standalone scripts under sbin/windows in cpp …
hongzhi-gao Jun 4, 2026
4edd844
fix(ci): start IoTDB on Windows with cmd //c and wait for RPC port 6667
hongzhi-gao Jun 4, 2026
a51ace8
fix(ci): upload cpp SDK tarball before packaged example smoke tests
hongzhi-gao Jun 4, 2026
fdefd76
refactor(client-cpp): use zip for SDK release packages instead of tar.gz
hongzhi-gao Jun 4, 2026
b43d1e1
fix(ci): correct Git Bash quoting when starting IoTDB on Windows
hongzhi-gao Jun 4, 2026
aa46a2f
fix(ci): build packaged examples as x64 for VS2017 on Windows
hongzhi-gao Jun 4, 2026
9e00d43
Improve C++ session package documentation
hongzhi-gao Jun 5, 2026
6a71c1b
Set CXX11 ABI for glibc217 C++ package
hongzhi-gao Jun 5, 2026
520fac6
Fix C++ SDK CXX11 ABI propagation
hongzhi-gao Jun 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .github/scripts/local-verify-packaged-examples-windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#!/usr/bin/env bash
# Mirror package-windows "Verify packaged examples" from unzip through example exes.
# Usage: local-verify-packaged-examples-windows.sh <path-to-iotdb-session-cpp.zip> [workspace]
set -euxo pipefail

PKG_TARBALL="${1:?zip path required}"
GITHUB_WORKSPACE="${2:-$(cd "$(dirname "$0")/../.." && pwd)}"
CMAKE_GENERATOR="${CMAKE_GENERATOR:-}"
SKIP_DIST_MVN="${SKIP_DIST_MVN:-0}"

export RUNNER_OS=Windows
export RUNNER_TEMP="${RUNNER_TEMP:-${TEMP:-/tmp}}"
TEMP_BASE="$(cygpath -u "${RUNNER_TEMP}")"
WORKSPACE_BASE="$(cygpath -u "${GITHUB_WORKSPACE}")"

echo "PKG_TARBALL=${PKG_TARBALL}"
echo "WORKSPACE_BASE=${WORKSPACE_BASE}"
echo "TEMP_BASE=${TEMP_BASE}"

PKG_UNPACK="${TEMP_BASE}/client-cpp-package"
rm -rf "${PKG_UNPACK}"
mkdir -p "${PKG_UNPACK}"
unzip -q -o "${PKG_TARBALL}" -d "${PKG_UNPACK}"
# GitHub artifact downloads may be a wrapper zip containing the real package zip + .sha512.
NESTED_ZIP=$(find "${PKG_UNPACK}" -maxdepth 1 -type f -name 'iotdb-session-cpp-*.zip' ! -name '*.sha512' -print -quit)
if [ -n "${NESTED_ZIP}" ]; then
echo "Unpacking nested SDK zip: ${NESTED_ZIP}"
unzip -q -o "${NESTED_ZIP}" -d "${PKG_UNPACK}"
fi
PKG_ROOT=$(find "${PKG_UNPACK}" -mindepth 1 -maxdepth 1 -type d -name 'iotdb-session-cpp-*' -print -quit)
test -n "${PKG_ROOT}"
echo "PKG_ROOT=${PKG_ROOT}"

EXAMPLE_BUILD="${TEMP_BASE}/client-cpp-example-smoke"
rm -rf "${EXAMPLE_BUILD}"
CMAKE_ARGS=(-S "${PKG_ROOT}/examples" -B "${EXAMPLE_BUILD}" -DIOTDB_SDK_ROOT="${PKG_ROOT}")
if [ -n "${CMAKE_GENERATOR}" ]; then
CMAKE_ARGS+=(-G "${CMAKE_GENERATOR}" -A x64)
fi
cmake "${CMAKE_ARGS[@]}"
cmake --build "${EXAMPLE_BUILD}" --config Release

if [ "${SKIP_DIST_MVN}" = "0" ]; then
(cd "${WORKSPACE_BASE}" && ./mvnw -pl distribution -am -DskipTests -Dspotless.skip=true package)
else
echo "SKIP_DIST_MVN=1: skipping ./mvnw -pl distribution package"
fi

SERVER_ROOT=$(find "${WORKSPACE_BASE}/distribution/target" -path '*/apache-iotdb-*-all-bin/sbin/windows/start-standalone.bat' -print -quit | sed 's#/sbin/windows/start-standalone.bat##')
if [ -z "${SERVER_ROOT}" ]; then
echo "ERROR: no distribution under distribution/target (set SKIP_DIST_MVN=0 to build)"
exit 1
fi
echo "SERVER_ROOT=${SERVER_ROOT}"

START_BAT="$(cygpath -w "${SERVER_ROOT}/sbin/windows/start-standalone.bat")"
STOP_BAT="$(cygpath -w "${SERVER_ROOT}/sbin/windows/stop-standalone.bat")"
cmd.exe //c "${START_BAT}"
trap "cmd.exe //c \"${STOP_BAT}\" || true" EXIT

echo "Waiting for IoTDB RPC on 127.0.0.1:6667..."
ready=0
for _ in $(seq 1 60); do
if powershell.exe -NoProfile -Command \
'(Test-NetConnection -ComputerName 127.0.0.1 -Port 6667 -WarningAction SilentlyContinue).TcpTestSucceeded' \
| grep -qi True; then
ready=1
break
fi
sleep 2
done
if [ "${ready}" -ne 1 ]; then
echo "ERROR: IoTDB did not listen on 6667 within 120s"
ls -la "${SERVER_ROOT}/logs" 2>/dev/null || true
exit 1
fi

for exe in SessionExample.exe AlignedTimeseriesSessionExample.exe TableModelSessionExample.exe tree_example.exe table_example.exe; do
EXE=$(find "${EXAMPLE_BUILD}" -name "${exe}" -print -quit)
test -n "${EXE}"
echo "Running ${EXE}"
"${EXE}"
done
echo "OK: local Windows verify packaged examples smoke passed"
135 changes: 135 additions & 0 deletions .github/scripts/package-client-cpp-manylinux-glibc217.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with this
# work for additional information regarding copyright ownership. The ASF
# licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Build client-cpp in manylinux2014 and verify max required GLIBC symbol <= 2.17.
set -euxo pipefail

MACHINE=$(uname -m)
case "${MACHINE}" in
x86_64)
CMAKE_PKG_ARCH=linux-x86_64
JDK_API_ARCH=linux/x64
DEFAULT_CLASSIFIER=linux-x86_64-glibc2.17
;;
aarch64)
CMAKE_PKG_ARCH=linux-aarch64
JDK_API_ARCH=linux/aarch64
DEFAULT_CLASSIFIER=linux-aarch64-glibc2.17
;;
*)
echo "Unsupported architecture: ${MACHINE}" >&2
exit 1
;;
esac

PACKAGE_CLASSIFIER="${PACKAGE_CLASSIFIER:-${DEFAULT_CLASSIFIER}}"

CMAKE_VERSION=3.28.4
CMAKE_DIR="/opt/cmake-${CMAKE_VERSION}"
if [[ ! -x "${CMAKE_DIR}/bin/cmake" ]]; then
curl -fsSL -o /tmp/cmake.tar.gz "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-${CMAKE_PKG_ARCH}.tar.gz"
rm -rf "${CMAKE_DIR}"
mkdir -p /opt
tar xf /tmp/cmake.tar.gz -C /opt
mv "/opt/cmake-${CMAKE_VERSION}-${CMAKE_PKG_ARCH}" "${CMAKE_DIR}"
fi

JAVA_HOME=/opt/jdk-17
if [[ ! -x "${JAVA_HOME}/bin/java" ]]; then
curl -fsSL -o /tmp/jdk17.tar.gz "https://api.adoptium.net/v3/binary/latest/17/ga/${JDK_API_ARCH}/jdk/hotspot/normal/eclipse?project=jdk"
rm -rf /opt/jdk-17*
mkdir -p /opt
tar xf /tmp/jdk17.tar.gz -C /opt
JAVA_HOME=$(find /opt -maxdepth 1 -type d -name 'jdk-17*' -print -quit)
ln -sfn "${JAVA_HOME}" /opt/jdk-17
JAVA_HOME=/opt/jdk-17
fi

export PATH="${CMAKE_DIR}/bin:${JAVA_HOME}/bin:${PATH}"
export JAVA_HOME

gcc --version
cmake --version
java -version

cd "${GITHUB_WORKSPACE:?GITHUB_WORKSPACE is not set}"
./mvnw clean package -P with-cpp -pl iotdb-client/client-cpp -am -DskipTests \
-Dspotless.skip=true \
-Dclient.cpp.package.classifier="${PACKAGE_CLASSIFIER}" \
-Diotdb.cxx11.abi=1

SO="iotdb-client/client-cpp/target/install/lib/libiotdb_session.so"
test -f "${SO}"

echo "=== Build host glibc ==="
ldd --version 2>&1 | sed -n '1p'

echo "=== Highest GLIBC_* symbols in libiotdb_session.so ==="
objdump -T "${SO}" | grep GLIBC_ | sed "s/.*GLIBC_/GLIBC_/" | sort -Vu | tail -10

max_glibc=$(objdump -T "${SO}" | grep -oE "GLIBC_[0-9.]+" | sed "s/GLIBC_//" | sort -t. -k1,1n -k2,2n -k3,3n | tail -1)
echo "max_glibc=${max_glibc}"

if [[ -z "${max_glibc}" ]]; then
echo "ERROR: could not determine max GLIBC version from ${SO}"
exit 1
fi

if awk -v max="${max_glibc}" "BEGIN { exit !(max > 2.17) }"; then
echo "ERROR: libiotdb_session.so requires glibc > 2.17 (max=${max_glibc})"
exit 1
fi

echo "glibc compatibility check passed (max=${max_glibc} <= 2.17)"

echo "=== Example package build/link/run smoke test ==="
PKG_ZIP=$(find "${GITHUB_WORKSPACE}/iotdb-client/client-cpp/target" -maxdepth 1 -type f -name "iotdb-session-cpp-*-${PACKAGE_CLASSIFIER}.zip" -print -quit)
if [[ -z "${PKG_ZIP}" ]]; then
echo "ERROR: could not find package zip for ${PACKAGE_CLASSIFIER}"
exit 1
fi
PKG_UNPACK="/tmp/client-cpp-package-smoke-glibc217"
rm -rf "${PKG_UNPACK}"
mkdir -p "${PKG_UNPACK}"
unzip -q -o "${PKG_ZIP}" -d "${PKG_UNPACK}"
PKG_ROOT=$(find "${PKG_UNPACK}" -mindepth 1 -maxdepth 1 -type d -name "iotdb-session-cpp-*-${PACKAGE_CLASSIFIER}" -print -quit)
if [[ -z "${PKG_ROOT}" ]]; then
echo "ERROR: could not find unpacked package directory for ${PACKAGE_CLASSIFIER}"
exit 1
fi
EXAMPLE_BUILD="/tmp/client-cpp-example-smoke-glibc217"
rm -rf "${EXAMPLE_BUILD}"
mkdir -p "${EXAMPLE_BUILD}"
unset CC CXX CFLAGS CXXFLAGS
"${CMAKE_DIR}/bin/cmake" -S "${PKG_ROOT}/examples" -B "${EXAMPLE_BUILD}" \
-DCMAKE_BUILD_TYPE=Release \
-DIOTDB_SDK_ROOT="${PKG_ROOT}"
"${CMAKE_DIR}/bin/cmake" --build "${EXAMPLE_BUILD}" -j"$(nproc)"

./mvnw -pl distribution -am -DskipTests -Dspotless.skip=true package
SERVER_ROOT=$(find "${GITHUB_WORKSPACE}/distribution/target" -path '*/apache-iotdb-*-all-bin/sbin/start-standalone.sh' -print -quit | sed 's#/sbin/start-standalone.sh##')
if [[ -z "${SERVER_ROOT}" ]]; then
echo "ERROR: could not find IoTDB distribution under distribution/target"
exit 1
fi
"${SERVER_ROOT}/sbin/start-standalone.sh"
trap '"${SERVER_ROOT}/sbin/stop-standalone.sh" || true' EXIT
sleep 30
for example in SessionExample AlignedTimeseriesSessionExample TableModelSessionExample tree_example table_example; do
test -x "${EXAMPLE_BUILD}/${example}"
"${EXAMPLE_BUILD}/${example}"
done
echo "Example package smoke test passed"
40 changes: 40 additions & 0 deletions .github/scripts/test-vs2017-x64-examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
set -euxo pipefail

PKG_ZIP="${1:-/c/Users/76141/Downloads/iotdb-session-cpp-2.0.7-SNAPSHOT-windows-x86_64-msvc14.3.zip}"
REPO_EXAMPLES="${2:-/d/workspace/iotdb/iotdb-client/client-cpp/examples}"
GEN='Visual Studio 15 2017'

TMP=/tmp/vs2017-smoke
rm -rf "${TMP}" && mkdir -p "${TMP}/outer"
unzip -q -o "${PKG_ZIP}" -d "${TMP}/outer"
INNER=$(find "${TMP}/outer" -maxdepth 1 -name 'iotdb-session-cpp-*.zip' ! -name '*.sha512' -print -quit)
unzip -q -o "${INNER}" -d "${TMP}"
PKG_ROOT=$(find "${TMP}" -mindepth 1 -maxdepth 1 -type d -name 'iotdb-session-cpp-*' -print -quit)
echo "PKG_ROOT=${PKG_ROOT}"

cl_path_from_cache() {
grep -m1 'CMAKE_CXX_COMPILER:FILEPATH=' "$1/CMakeCache.txt" | cut -d= -f2 || true
}

echo "=== without -A x64 (packaged examples, reproduces CI bug) ==="
B1=/tmp/vs2017-no-a
rm -rf "${B1}"
cmake -S "${PKG_ROOT}/examples" -B "${B1}" -DIOTDB_SDK_ROOT="${PKG_ROOT}" -G "${GEN}"
echo "cl: $(cl_path_from_cache "${B1}")"

echo "=== with -A x64 (workflow fix on packaged examples) ==="
B2=/tmp/vs2017-a-x64
rm -rf "${B2}"
cmake -S "${PKG_ROOT}/examples" -B "${B2}" -DIOTDB_SDK_ROOT="${PKG_ROOT}" -G "${GEN}" -A x64
echo "cl: $(cl_path_from_cache "${B2}")"
cmake --build "${B2}" --config Release --target SessionExample

echo "=== repo examples CMakeLists (CMAKE fix, no -A on cmd) ==="
B3=/tmp/vs2017-cmakefix
rm -rf "${B3}"
cmake -S "${REPO_EXAMPLES}" -B "${B3}" -DIOTDB_SDK_ROOT="${PKG_ROOT}" -G "${GEN}"
echo "cl: $(cl_path_from_cache "${B3}")"
cmake --build "${B3}" --config Release --target SessionExample

echo "OK: VS2017 x64 example build verified"
Loading
Loading