This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new b28374ea69a Enable cpp client CI on Windows-2019 with visual studio
2019 (#13289)
b28374ea69a is described below
commit b28374ea69a7a4c4e6abd27061af97637e843fd8
Author: Haonan <[email protected]>
AuthorDate: Sat Aug 24 01:29:40 2024 +0800
Enable cpp client CI on Windows-2019 with visual studio 2019 (#13289)
---
.github/workflows/multi-language-client.yml | 12 +++++++++---
iotdb-client/client-cpp/README.md | 17 +++++++++++++----
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/multi-language-client.yml
b/.github/workflows/multi-language-client.yml
index 1b430d3483a..ac3f3a63cdb 100644
--- a/.github/workflows/multi-language-client.yml
+++ b/.github/workflows/multi-language-client.yml
@@ -44,7 +44,7 @@ jobs:
fail-fast: false
max-parallel: 15
matrix:
- os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-latest,
windows-latest]
+ os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2019,
windows-2022, macos-latest]
runs-on: ${{ matrix.os}}
steps:
@@ -65,7 +65,11 @@ jobs:
if: runner.os == 'Windows'
run: |
choco install winflexbison3
- choco install boost-msvc-14.3
+ if ("${{ matrix.os }}" -eq "windows-2019") {
+ choco install boost-msvc-14.2
+ } else {
+ choco install boost-msvc-14.3
+ }
$boost_path = (Get-ChildItem -Path 'C:\local\' -Filter
'boost_*').FullName
echo $boost_path >> $env:GITHUB_PATH
- name: Cache Maven packages
@@ -85,7 +89,9 @@ jobs:
run: |
if [[ "$RUNNER_OS" == "Linux" ]]; then
./mvnw clean verify -P with-cpp -pl
iotdb-client/client-cpp,example/client-cpp-example -am
-Diotdb-tools-thrift.version=0.14.1.1-glibc223-SNAPSHOT
- else
+ elif [[ "${{ matrix.os }}" == "windows-2019" ]]; then
+ ./mvnw clean verify -P with-cpp -pl
iotdb-client/client-cpp,example/client-cpp-example -am
-Diotdb-tools-thrift.version=0.14.1.1-msvc142-SNAPSHOT
-Dcmake.generator="Visual Studio 16 2019"
+ else
./mvnw clean verify -P with-cpp -pl
iotdb-client/client-cpp,example/client-cpp-example -am
fi
- name: Upload Artifact
diff --git a/iotdb-client/client-cpp/README.md
b/iotdb-client/client-cpp/README.md
index 81983e06e2e..db372bbae11 100644
--- a/iotdb-client/client-cpp/README.md
+++ b/iotdb-client/client-cpp/README.md
@@ -42,12 +42,21 @@ Studio. It is highly recommended to use Visual Studio 2022
or later.
If you are using Visual Studio 2022, you can compile the cpp client with the
following command:
```
-mvn clean package -P with-cpp -pl iotdb-client/client-cpp -am -DskipTest
+mvn clean package -P with-cpp -pl iotdb-client/client-cpp -am -DskipTests
-D"boost.include.dir"="D:\boost_1_75_0"
-D"boost.library.dir"="D:\boost_1_75_0\stage\lib"
```
-#### Visual Studio 2019 or older
-If you are using Visual Studio 2019 or older, the pre-built Thrift library is
incompatible. You
+##### Visual Studio 2019
+If you are using Visual Studio 2019, you can compile the cpp client with the
following command:
+
+```
+mvn clean package -P with-cpp -pl iotdb-client/client-cpp -am -DskipTests
+-D"boost.include.dir"="D:\boost_1_75_0"
-D"boost.library.dir"="D:\boost_1_75_0\stage\lib"
+-Diotdb-tools-thrift.version=0.14.1.1-msvc142-SNAPSHOT
-Dcmake.generator="Visual Studio 16 2019"
+```
+
+#### Visual Studio 2017 or older
+If you are using Visual Studio 2017 or older, the pre-built Thrift library is
incompatible. You
will have to compile the thrift library manually:
1. Install the dependencies of Thrift:
@@ -70,7 +79,7 @@ will have to compile the thrift library manually:
5. Return to the cpp client repository and compile it with:
```
-mvn clean package -P with-cpp -pl iotdb-client/client-cpp -am -DskipTest
+mvn clean package -P with-cpp -pl iotdb-client/client-cpp -am -DskipTests
-D"boost.include.dir"="D:\boost_1_75_0"
-D"boost.library.dir"="D:\boost_1_75_0\stage\lib"
```