Skip to content

Commit 5d9e3af

Browse files
committed
fix(ci): normalize RUNNER_TEMP for Windows tar extract in cpp package smoke test
Git Bash on Windows runners passes D:\a\_temp to tar -C, which MSYS tar cannot open; convert via cygpath -u before unpack and example build paths.
1 parent 175bbd0 commit 5d9e3af

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/client-cpp-package.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,13 +463,18 @@ jobs:
463463
set -euxo pipefail
464464
PKG_TARBALL=$(find iotdb-client/client-cpp/target -maxdepth 1 -type f -name 'iotdb-session-cpp-*.tar.gz' -print -quit)
465465
test -n "${PKG_TARBALL}"
466-
PKG_UNPACK="${RUNNER_TEMP}/client-cpp-package"
466+
if [ "${RUNNER_OS}" = "Windows" ]; then
467+
TEMP_BASE="$(cygpath -u "${RUNNER_TEMP}")"
468+
else
469+
TEMP_BASE="${RUNNER_TEMP}"
470+
fi
471+
PKG_UNPACK="${TEMP_BASE}/client-cpp-package"
467472
rm -rf "${PKG_UNPACK}"
468473
mkdir -p "${PKG_UNPACK}"
469474
tar -xzf "${PKG_TARBALL}" -C "${PKG_UNPACK}"
470475
PKG_ROOT=$(find "${PKG_UNPACK}" -mindepth 1 -maxdepth 1 -type d -name 'iotdb-session-cpp-*' -print -quit)
471476
test -n "${PKG_ROOT}"
472-
EXAMPLE_BUILD="${RUNNER_TEMP}/client-cpp-example-smoke"
477+
EXAMPLE_BUILD="${TEMP_BASE}/client-cpp-example-smoke"
473478
CMAKE_ARGS=(-S "${PKG_ROOT}/examples" -B "${EXAMPLE_BUILD}" -DIOTDB_SDK_ROOT="${PKG_ROOT}")
474479
if [ -n "${CMAKE_GENERATOR:-}" ]; then
475480
CMAKE_ARGS+=(-G "${CMAKE_GENERATOR}")

0 commit comments

Comments
 (0)