Skip to content

Commit fdefd76

Browse files
committed
refactor(client-cpp): use zip for SDK release packages instead of tar.gz
Align Maven assembly, distribution bundle, CI resolve/upload, smoke-test unpack (unzip), and docs on iotdb-session-cpp-<version>-<classifier>.zip.
1 parent a51ace8 commit fdefd76

11 files changed

Lines changed: 50 additions & 50 deletions

File tree

.github/scripts/package-client-cpp-manylinux-glibc217.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ fi
9595
echo "glibc compatibility check passed (max=${max_glibc} <= 2.17)"
9696

9797
echo "=== Example package build/link/run smoke test ==="
98-
PKG_TARBALL=$(find "${GITHUB_WORKSPACE}/iotdb-client/client-cpp/target" -maxdepth 1 -type f -name "iotdb-session-cpp-*-${PACKAGE_CLASSIFIER}.tar.gz" -print -quit)
99-
if [[ -z "${PKG_TARBALL}" ]]; then
100-
echo "ERROR: could not find package tarball for ${PACKAGE_CLASSIFIER}"
98+
PKG_ZIP=$(find "${GITHUB_WORKSPACE}/iotdb-client/client-cpp/target" -maxdepth 1 -type f -name "iotdb-session-cpp-*-${PACKAGE_CLASSIFIER}.zip" -print -quit)
99+
if [[ -z "${PKG_ZIP}" ]]; then
100+
echo "ERROR: could not find package zip for ${PACKAGE_CLASSIFIER}"
101101
exit 1
102102
fi
103103
PKG_UNPACK="/tmp/client-cpp-package-smoke-glibc217"
104104
rm -rf "${PKG_UNPACK}"
105105
mkdir -p "${PKG_UNPACK}"
106-
tar -xzf "${PKG_TARBALL}" -C "${PKG_UNPACK}"
106+
unzip -q -o "${PKG_ZIP}" -d "${PKG_UNPACK}"
107107
PKG_ROOT=$(find "${PKG_UNPACK}" -mindepth 1 -maxdepth 1 -type d -name "iotdb-session-cpp-*-${PACKAGE_CLASSIFIER}" -print -quit)
108108
if [[ -z "${PKG_ROOT}" ]]; then
109109
echo "ERROR: could not find unpacked package directory for ${PACKAGE_CLASSIFIER}"

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

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -185,26 +185,26 @@ jobs:
185185
- name: Restore workspace ownership after container build
186186
if: always()
187187
run: sudo chown -R "$(id -u):$(id -g)" "${{ github.workspace }}"
188-
- name: Resolve package tarball
188+
- name: Resolve package zip
189189
id: pkg
190190
shell: bash
191191
run: |
192192
set -euo pipefail
193193
shopt -s nullglob
194-
packages=(iotdb-client/client-cpp/target/iotdb-session-cpp-*-linux-x86_64-glibc2.17.tar.gz)
194+
packages=(iotdb-client/client-cpp/target/iotdb-session-cpp-*-linux-x86_64-glibc2.17.zip)
195195
if [ "${#packages[@]}" -ne 1 ]; then
196-
echo "Expected exactly one package tarball, got: ${packages[*]:-(none)}"
196+
echo "Expected exactly one package zip, got: ${packages[*]:-(none)}"
197197
exit 1
198198
fi
199199
echo "path=${packages[0]}" >> "$GITHUB_OUTPUT"
200-
echo "name=$(basename "${packages[0]}" .tar.gz)" >> "$GITHUB_OUTPUT"
200+
echo "name=$(basename "${packages[0]}" .zip)" >> "$GITHUB_OUTPUT"
201201
sha512="${packages[0]}.sha512"
202202
if [ ! -f "${sha512}" ]; then
203203
echo "Expected checksum file: ${sha512}"
204204
exit 1
205205
fi
206206
echo "sha512_path=${sha512}" >> "$GITHUB_OUTPUT"
207-
- name: Upload tarball artifact
207+
- name: Upload zip artifact
208208
uses: actions/upload-artifact@v6
209209
with:
210210
name: ${{ steps.pkg.outputs.name }}
@@ -243,26 +243,26 @@ jobs:
243243
- name: Restore workspace ownership after container build
244244
if: always()
245245
run: sudo chown -R "$(id -u):$(id -g)" "${{ github.workspace }}"
246-
- name: Resolve package tarball
246+
- name: Resolve package zip
247247
id: pkg
248248
shell: bash
249249
run: |
250250
set -euo pipefail
251251
shopt -s nullglob
252-
packages=(iotdb-client/client-cpp/target/iotdb-session-cpp-*-linux-aarch64-glibc2.17.tar.gz)
252+
packages=(iotdb-client/client-cpp/target/iotdb-session-cpp-*-linux-aarch64-glibc2.17.zip)
253253
if [ "${#packages[@]}" -ne 1 ]; then
254-
echo "Expected exactly one package tarball, got: ${packages[*]:-(none)}"
254+
echo "Expected exactly one package zip, got: ${packages[*]:-(none)}"
255255
exit 1
256256
fi
257257
echo "path=${packages[0]}" >> "$GITHUB_OUTPUT"
258-
echo "name=$(basename "${packages[0]}" .tar.gz)" >> "$GITHUB_OUTPUT"
258+
echo "name=$(basename "${packages[0]}" .zip)" >> "$GITHUB_OUTPUT"
259259
sha512="${packages[0]}.sha512"
260260
if [ ! -f "${sha512}" ]; then
261261
echo "Expected checksum file: ${sha512}"
262262
exit 1
263263
fi
264264
echo "sha512_path=${sha512}" >> "$GITHUB_OUTPUT"
265-
- name: Upload tarball artifact
265+
- name: Upload zip artifact
266266
uses: actions/upload-artifact@v6
267267
with:
268268
name: ${{ steps.pkg.outputs.name }}
@@ -316,26 +316,26 @@ jobs:
316316
set -euxo pipefail
317317
./mvnw clean package -P with-cpp -pl iotdb-client/client-cpp -am -DskipTests \
318318
-Dspotless.skip=true
319-
- name: Resolve package tarball
319+
- name: Resolve package zip
320320
id: pkg
321321
shell: bash
322322
run: |
323323
set -euo pipefail
324324
shopt -s nullglob
325-
packages=(iotdb-client/client-cpp/target/iotdb-session-cpp-*.tar.gz)
325+
packages=(iotdb-client/client-cpp/target/iotdb-session-cpp-*.zip)
326326
if [ "${#packages[@]}" -ne 1 ]; then
327-
echo "Expected exactly one package tarball, got: ${packages[*]:-(none)}"
327+
echo "Expected exactly one package zip, got: ${packages[*]:-(none)}"
328328
exit 1
329329
fi
330330
echo "path=${packages[0]}" >> "$GITHUB_OUTPUT"
331-
echo "name=$(basename "${packages[0]}" .tar.gz)" >> "$GITHUB_OUTPUT"
331+
echo "name=$(basename "${packages[0]}" .zip)" >> "$GITHUB_OUTPUT"
332332
sha512="${packages[0]}.sha512"
333333
if [ ! -f "${sha512}" ]; then
334334
echo "Expected checksum file: ${sha512}"
335335
exit 1
336336
fi
337337
echo "sha512_path=${sha512}" >> "$GITHUB_OUTPUT"
338-
- name: Upload tarball artifact
338+
- name: Upload zip artifact
339339
uses: actions/upload-artifact@v6
340340
with:
341341
name: ${{ steps.pkg.outputs.name }}
@@ -352,7 +352,7 @@ jobs:
352352
PKG_UNPACK="${RUNNER_TEMP}/client-cpp-package"
353353
rm -rf "${PKG_UNPACK}"
354354
mkdir -p "${PKG_UNPACK}"
355-
tar -xzf "${PKG_TARBALL}" -C "${PKG_UNPACK}"
355+
unzip -q -o "${PKG_TARBALL}" -d "${PKG_UNPACK}"
356356
PKG_ROOT=$(find "${PKG_UNPACK}" -mindepth 1 -maxdepth 1 -type d -name 'iotdb-session-cpp-*' -print -quit)
357357
test -n "${PKG_ROOT}"
358358
EXAMPLE_BUILD="${RUNNER_TEMP}/client-cpp-example-smoke"
@@ -455,26 +455,26 @@ jobs:
455455
throw "Expected PE32+ x64 (machine=0x8664), got 0x$($machine.ToString('X4'))"
456456
}
457457
Write-Host "Verified x64 DLL: $dll"
458-
- name: Resolve package tarball
458+
- name: Resolve package zip
459459
id: pkg
460460
shell: bash
461461
run: |
462462
set -euo pipefail
463463
shopt -s nullglob
464-
packages=(iotdb-client/client-cpp/target/iotdb-session-cpp-*-${{ matrix.package_classifier }}.tar.gz)
464+
packages=(iotdb-client/client-cpp/target/iotdb-session-cpp-*-${{ matrix.package_classifier }}.zip)
465465
if [ "${#packages[@]}" -ne 1 ]; then
466-
echo "Expected exactly one package tarball, got: ${packages[*]:-(none)}"
466+
echo "Expected exactly one package zip, got: ${packages[*]:-(none)}"
467467
exit 1
468468
fi
469469
echo "path=${packages[0]}" >> "$GITHUB_OUTPUT"
470-
echo "name=$(basename "${packages[0]}" .tar.gz)" >> "$GITHUB_OUTPUT"
470+
echo "name=$(basename "${packages[0]}" .zip)" >> "$GITHUB_OUTPUT"
471471
sha512="${packages[0]}.sha512"
472472
if [ ! -f "${sha512}" ]; then
473473
echo "Expected checksum file: ${sha512}"
474474
exit 1
475475
fi
476476
echo "sha512_path=${sha512}" >> "$GITHUB_OUTPUT"
477-
- name: Upload tarball artifact
477+
- name: Upload zip artifact
478478
uses: actions/upload-artifact@v6
479479
with:
480480
name: ${{ steps.pkg.outputs.name }}
@@ -498,7 +498,7 @@ jobs:
498498
PKG_UNPACK="${TEMP_BASE}/client-cpp-package"
499499
rm -rf "${PKG_UNPACK}"
500500
mkdir -p "${PKG_UNPACK}"
501-
tar -xzf "${PKG_TARBALL}" -C "${PKG_UNPACK}"
501+
unzip -q -o "${PKG_TARBALL}" -d "${PKG_UNPACK}"
502502
PKG_ROOT=$(find "${PKG_UNPACK}" -mindepth 1 -maxdepth 1 -type d -name 'iotdb-session-cpp-*' -print -quit)
503503
test -n "${PKG_ROOT}"
504504
EXAMPLE_BUILD="${TEMP_BASE}/client-cpp-example-smoke"

distribution/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@
234234
<fileSets>
235235
<fileSet>
236236
<includes combine.children="append">
237-
<include>apache-iotdb-${project.version}-client-cpp-${client.cpp.package.classifier}-bin.tar.gz</include>
237+
<include>apache-iotdb-${project.version}-client-cpp-${client.cpp.package.classifier}-bin.zip</include>
238238
</includes>
239239
</fileSet>
240240
</fileSets>

distribution/src/assembly/client-cpp.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<id>client-cpp-${client.cpp.package.classifier}-bin</id>
2424
<formats>
2525
<format>dir</format>
26-
<format>tar.gz</format>
26+
<format>zip</format>
2727
</formats>
2828
<baseDirectory>apache-iotdb-${project.version}-client-cpp-${client.cpp.package.classifier}-bin</baseDirectory>
2929
<fileSets>

iotdb-client/client-cpp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ set(IOTDB_PUBLIC_HEADERS
174174
ColumnDecoder.h
175175
TsBlock.h)
176176

177-
# Windows: RUNTIME = iotdb_session.dll, ARCHIVE = import .lib (both under lib/ in the tarball).
177+
# Windows: RUNTIME = iotdb_session.dll, ARCHIVE = import .lib (both under lib/ in the zip).
178178
install(TARGETS iotdb_session
179179
RUNTIME DESTINATION lib
180180
LIBRARY DESTINATION lib

iotdb-client/client-cpp/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ During configure CMake will, in order:
5353
5. Compile `iotdb_session` (the C/C++ session library) and, optionally,
5454
the Catch2 integration test binaries.
5555
6. `cmake --install` lays out the SDK under `target/install/{include,lib}`,
56-
which Maven's assembly step packages into a tarball.
56+
which Maven's assembly step packages into a zip.
5757

5858
## Build matrix
5959

@@ -64,19 +64,19 @@ During configure CMake will, in order:
6464
| Library + ITs (Linux/macOS) | `mvn clean install -P with-cpp -pl distribution,iotdb-client/client-cpp -am` then `mvn -P with-cpp -pl iotdb-client/client-cpp -am verify` |
6565
| Direct CMake (no Maven) | `cmake -S iotdb-client/client-cpp -B build && cmake --build build --target install` |
6666

67-
The Maven build sets `cmake.install.prefix` to `target/install/`. Output tarballs
68-
land at `iotdb-client/client-cpp/target/iotdb-session-cpp-<version>-<classifier>.tar.gz`
67+
The Maven build sets `cmake.install.prefix` to `target/install/`. Output zips
68+
land at `iotdb-client/client-cpp/target/iotdb-session-cpp-<version>-<classifier>.zip`
6969
(with a package root directory and a `.sha512` checksum generated alongside).
7070
The classifier can be overridden with `-Dclient.cpp.package.classifier=...` when
7171
building multiple toolchains on the same platform.
7272

7373
### Release packages (CI)
7474

7575
The [C++ Client package](../../.github/workflows/client-cpp-package.yml) workflow
76-
builds one tarball per platform/toolchain. Pick the artifact that matches your
76+
builds one zip per platform/toolchain. Pick the artifact that matches your
7777
deployment environment:
7878

79-
| Target environment | Tarball classifier (suffix) |
79+
| Target environment | Zip classifier (suffix) |
8080
|--------------------|-------------------------|
8181
| Linux x86_64, glibc >= 2.17 | `linux-x86_64-glibc2.17` |
8282
| Linux aarch64, glibc >= 2.17 | `linux-aarch64-glibc2.17` |
@@ -88,7 +88,7 @@ deployment environment:
8888
| Windows + Visual Studio 2026 | `windows-x86_64-msvc14.4` |
8989

9090
Example file name:
91-
`iotdb-session-cpp-2.0.10.1-linux-x86_64-glibc2.17.tar.gz`.
91+
`iotdb-session-cpp-2.0.10.1-linux-x86_64-glibc2.17.zip`.
9292

9393
Linux release packages are built in the `manylinux2014` container, so they require
9494
glibc 2.17 or newer on the deployment host.
@@ -229,7 +229,7 @@ CI environments can share a single cache by setting
229229
### Windows
230230

231231
Visual Studio **2017, 2019, 2022, or 2026** is supported for building the SDK.
232-
Link your application against the tarball built with the **same VS generation** you
232+
Link your application against the zip built with the **same VS generation** you
233233
use for your project.
234234

235235
Prerequisites:
@@ -305,7 +305,7 @@ JDK 11+).
305305
## Package layout
306306

307307
A successful `mvn ... package` produces
308-
`target/iotdb-session-cpp-<version>-<classifier>.tar.gz` with this layout:
308+
`target/iotdb-session-cpp-<version>-<classifier>.zip` with this layout:
309309

310310
```
311311
README.md

iotdb-client/client-cpp/examples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ if(NOT _iotdb_examples_in_tree)
8383
if(NOT EXISTS "${_iotdb_link_lib}")
8484
message(FATAL_ERROR
8585
"IoTDB SDK not found at ${IOTDB_SDK_ROOT}. "
86-
"Unpack iotdb-session-cpp-<version>-<classifier>.tar.gz so that ${_iotdb_link_lib} exists.")
86+
"Unpack iotdb-session-cpp-<version>-<classifier>.zip so that ${_iotdb_link_lib} exists.")
8787
endif()
8888
endif()
8989

iotdb-client/client-cpp/examples/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ user `root` / `root`).
3939
| `tree_example` | C Session API (tree model) |
4040
| `table_example` | C Session API (table model) |
4141

42-
## Which SDK tarball to use
42+
## Which SDK zip to use
4343

4444
Release CI ([client-cpp-package.yml](../../.github/workflows/client-cpp-package.yml))
45-
publishes one tarball per platform/toolchain:
46-
`iotdb-session-cpp-<version>-<classifier>.tar.gz` (package root contains `include/` and `lib/`).
45+
publishes one zip per platform/toolchain:
46+
`iotdb-session-cpp-<version>-<classifier>.zip` (package root contains `include/` and `lib/`).
4747

4848
| Deployment target | Classifier suffix |
4949
|-------------------|-------------------|
@@ -61,7 +61,7 @@ pre-built Thrift workflow only. Linux release packages are built in the
6161

6262
## SDK layout (after unpack)
6363

64-
The SDK tarball produced by `client-cpp` contains **public headers only** and one
64+
The SDK zip produced by `client-cpp` contains **public headers only** and one
6565
shared library:
6666

6767
```

iotdb-client/client-cpp/examples/README_zh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
## 选择哪个 SDK 压缩包
4242

4343
CI 发版([client-cpp-package.yml](../../.github/workflows/client-cpp-package.yml)
44-
会按平台/工具链打出多份 tarball,文件名形如
45-
`iotdb-session-cpp-<version>-<classifier>.tar.gz`(解压后根目录即为 `include/``lib/`)。请按目标环境选择:
44+
会按平台/工具链打出多份 zip,文件名形如
45+
`iotdb-session-cpp-<version>-<classifier>.zip`(解压后根目录即为 `include/``lib/`)。请按目标环境选择:
4646

4747
| 目标环境 | classifier 后缀 |
4848
|----------|-----------------|

iotdb-client/client-cpp/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
(legacy CLI from the old build), feed it to CMake as BOOST_INCLUDEDIR. -->
5858
<boost.include.dir/>
5959
<iotdb.extra.cxx.flags/>
60-
<!-- Override via -Dclient.cpp.package.classifier=... for per-toolchain release tarballs. -->
60+
<!-- Override via -Dclient.cpp.package.classifier=... for per-toolchain release zips. -->
6161
<client.cpp.package.classifier>${os.classifier}</client.cpp.package.classifier>
6262
<client.cpp.package.name>iotdb-session-cpp-${project.version}-${client.cpp.package.classifier}</client.cpp.package.name>
6363
<client.cpp.ci.build.id>${env.GITHUB_RUN_ID}</client.cpp.ci.build.id>
@@ -211,7 +211,7 @@
211211
</execution>
212212
</executions>
213213
</plugin>
214-
<!-- tar.gz: iotdb-session-cpp-<version>-<classifier>.tar.gz with a package root directory. -->
214+
<!-- zip: iotdb-session-cpp-<version>-<classifier>.zip with a package root directory. -->
215215
<plugin>
216216
<groupId>org.apache.maven.plugins</groupId>
217217
<artifactId>maven-assembly-plugin</artifactId>
@@ -231,7 +231,7 @@
231231
</execution>
232232
</executions>
233233
</plugin>
234-
<!-- Create SHA512 checksum files for the release tarball. -->
234+
<!-- Create SHA512 checksum files for the release zip. -->
235235
<plugin>
236236
<groupId>net.nicoulaj.maven.plugins</groupId>
237237
<artifactId>checksum-maven-plugin</artifactId>
@@ -250,7 +250,7 @@
250250
<fileSet>
251251
<directory>${project.build.directory}</directory>
252252
<includes>
253-
<include>${client.cpp.package.name}.tar.gz</include>
253+
<include>${client.cpp.package.name}.zip</include>
254254
</includes>
255255
</fileSet>
256256
</fileSets>

0 commit comments

Comments
 (0)