diff --git a/.github/workflows/flightsqlodbc_build.yml b/.github/workflows/flightsqlodbc_build.yml new file mode 100644 index 0000000000000..e2a1b5abffa43 --- /dev/null +++ b/.github/workflows/flightsqlodbc_build.yml @@ -0,0 +1,32 @@ +name: Flight SQL ODBC Driver Client for Windows + +on: + push: + paths: + - '.github/workflows/flightsqlodbc_build.yml' + - 'cpp/src/flightsql_odbc/flightsql-odbc/**' + pull_request: + paths: + - '.github/workflows/flightsqlodbc_build.yml' + - 'cpp/src/flightsql_odbc/flightsql-odbc/**' + +jobs: + build-windows32: + runs-on: windows-2022 + steps: + - uses: actions/checkout@v2 + + - name: configure-and-build-driver + run: | + cd cpp/src/flightsql_odbc/flightsql-odbc + .\build_win32.bat + + build-windows64: + runs-on: windows-2022 + steps: + - uses: actions/checkout@v2 + + - name: configure-and-build-driver + run: | + cd cpp/src/flightsql_odbc/flightsql-odbc + .\build_win64.bat \ No newline at end of file diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/build_win64.bat b/cpp/src/flightsql_odbc/flightsql-odbc/build_win64.bat index ef0d9cc0882ed..11b4bc0ef2712 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/build_win64.bat +++ b/cpp/src/flightsql_odbc/flightsql-odbc/build_win64.bat @@ -36,7 +36,9 @@ mkdir build cd build -if NOT DEFINED ARROW_GIT_REPOSITORY SET ARROW_GIT_REPOSITORY = "https://github.com/apache/arrow" +if NOT DEFINED ARROW_GIT_REPOSITORY ( + SET ARROW_GIT_REPOSITORY="https://github.com/apache/arrow" + ) cmake ..^ -DARROW_GIT_REPOSITORY=%ARROW_GIT_REPOSITORY%^ diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/CMakeLists.txt b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/CMakeLists.txt index 44887430398ad..c2fb049d29db9 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/CMakeLists.txt +++ b/cpp/src/flightsql_odbc/flightsql-odbc/flight_sql/CMakeLists.txt @@ -113,11 +113,13 @@ else() ) endif() +# If build fails, need to remove build folder to re-build. set(ARROW_GIT_REPOSITORY "https://github.com/apache/arrow.git" CACHE STRING "Arrow repository path or URL") set(ARROW_GIT_TAG "b050bd0d31db6412256cec3362c0d57c9732e1f2" CACHE STRING "Tag for the Arrow repository") message("Using Arrow from ${ARROW_GIT_REPOSITORY} on tag ${ARROW_GIT_TAG}") -ExternalProject_Add(ApacheArrow +ExternalProject_Add( + ApacheArrow GIT_REPOSITORY ${ARROW_GIT_REPOSITORY} GIT_TAG ${ARROW_GIT_TAG} CMAKE_ARGS ${ARROW_CMAKE_ARGS}) diff --git a/cpp/src/flightsql_odbc/flightsql-odbc/vcpkg.json b/cpp/src/flightsql_odbc/flightsql-odbc/vcpkg.json index 519d6441bec61..8c065a15654a1 100644 --- a/cpp/src/flightsql_odbc/flightsql-odbc/vcpkg.json +++ b/cpp/src/flightsql_odbc/flightsql-odbc/vcpkg.json @@ -12,18 +12,18 @@ "boost-optional", "boost-process", "boost-system", + "boost-test", "boost-variant", "boost-xpressive", "brotli", "gflags", "openssl", "protobuf", - "zlib", + { "name": "zlib", "version>=": "1.3" }, "re2", "spdlog", "grpc", "utf8proc", - "zlib", "zstd", "rapidjson" ],