Skip to content

Commit

Permalink
chore: Bump macos runner versions
Browse files Browse the repository at this point in the history
Bump arrow version (Windows 2022 build issue)
Bump couchbase version (Windows 2022 build issue)

Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Dec 11, 2024
1 parent 85d7cae commit 78c0482
Show file tree
Hide file tree
Showing 15 changed files with 396 additions and 13 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/prebuild-gh_envs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
"ubuntu-22.04-x64",
"windows-2019-x64",
"windows-2022-x64",
"macos-12-x64",
"macos-13-x64"
"macos-13-x64",
"macos-14-x64"
]
include:
- label: "ubuntu-20.04-x64"
Expand All @@ -51,16 +51,16 @@ jobs:
triplet: "x64-windows"
mono: ""
sudo: ""
- label: "macos-12-x64"
os: "macos-12"
triplet: "x64-osx"
mono: "mono"
sudo: "sudo"
- label: "macos-13-x64"
os: "macos-13"
triplet: "x64-osx"
mono: "mono"
sudo: "sudo"
- label: "macos-14-x64"
os: "macos-14"
triplet: "arm64-osx"
mono: "mono"
sudo: "sudo"
fail-fast: false

name: "GH Environment - ${{ matrix.label }}"
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
sudo apt-get -yq install -f mono-complete
- name: OSX Dependencies
if: ${{ matrix.os == 'macos-12' || matrix.os == 'macos-13' }}
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-14' }}
shell: "bash"
run: |
brew install bison flex pkg-config automake libtool autoconf autoconf-archive coreutils
Expand Down
27 changes: 27 additions & 0 deletions overlays/arrow/android.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt
index 6dc8358..2b91efa 100644
--- a/cpp/src/arrow/CMakeLists.txt
+++ b/cpp/src/arrow/CMakeLists.txt
@@ -166,7 +166,7 @@ if(WIN32)
list(APPEND ARROW_SYSTEM_LINK_LIBS "ws2_32")
endif()

-if(NOT WIN32 AND NOT APPLE)
+if(NOT WIN32 AND NOT APPLE AND NOT ANDROID)
# Pass -lrt on Linux only
list(APPEND ARROW_SYSTEM_LINK_LIBS rt)
endif()
diff --git a/cpp/src/arrow/vendored/musl/strptime.c b/cpp/src/arrow/vendored/musl/strptime.c
index 41912fd..0ea36e9 100644
--- a/cpp/src/arrow/vendored/musl/strptime.c
+++ b/cpp/src/arrow/vendored/musl/strptime.c
@@ -18,7 +18,9 @@
#undef HAVE_LANGINFO

#ifndef _WIN32
+# if !(defined(__ANDROID__) && __ANDROID_API__ < 26)
#define HAVE_LANGINFO 1
+# endif
#endif

#ifdef HAVE_LANGINFO
13 changes: 13 additions & 0 deletions overlays/arrow/msvc-static-name.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/cpp/cmake_modules/BuildUtils.cmake b/cpp/cmake_modules/BuildUtils.cmake
index 391c43e0a..50f6d3d3c 100644
--- a/cpp/cmake_modules/BuildUtils.cmake
+++ b/cpp/cmake_modules/BuildUtils.cmake
@@ -427,7 +427,7 @@ function(ADD_ARROW_LIB LIB_NAME)
target_include_directories(${LIB_NAME}_static PRIVATE ${ARG_PRIVATE_INCLUDES})
endif()

- if(MSVC_TOOLCHAIN)
+ if(MSVC_TOOLCHAIN AND 0)
set(LIB_NAME_STATIC ${LIB_NAME}_static)
else()
set(LIB_NAME_STATIC ${LIB_NAME})
150 changes: 150 additions & 0 deletions overlays/arrow/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
vcpkg_download_distfile(
ARCHIVE_PATH
URLS "https://archive.apache.org/dist/arrow/arrow-${VERSION}/apache-arrow-${VERSION}.tar.gz"
FILENAME apache-arrow-${VERSION}.tar.gz
SHA512 4e2a617b8deeb9f94ee085653a721904a75696f0827bcba82b535cc7f4f723066a09914c7fa83c593e51a8a4031e8bf99e563cac1ebb1d89604cb406975d4864
)
vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE ${ARCHIVE_PATH}
PATCHES
android.patch
msvc-static-name.patch
utf8proc.patch
thrift.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
acero ARROW_ACERO
compute ARROW_COMPUTE
csv ARROW_CSV
cuda ARROW_CUDA
dataset ARROW_DATASET
filesystem ARROW_FILESYSTEM
flight ARROW_FLIGHT
flightsql ARROW_FLIGHT_SQL
gcs ARROW_GCS
jemalloc ARROW_JEMALLOC
json ARROW_JSON
mimalloc ARROW_MIMALLOC
orc ARROW_ORC
parquet ARROW_PARQUET
parquet PARQUET_REQUIRE_ENCRYPTION
s3 ARROW_S3
)

if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
list(APPEND FEATURE_OPTIONS "-DARROW_USE_NATIVE_INT128=OFF")
endif()

string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ARROW_BUILD_SHARED)
string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" ARROW_BUILD_STATIC)
string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ARROW_DEPENDENCY_USE_SHARED)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/cpp"
OPTIONS
${FEATURE_OPTIONS}
-DARROW_BUILD_SHARED=${ARROW_BUILD_SHARED}
-DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC}
-DARROW_BUILD_TESTS=OFF
-DARROW_DEPENDENCY_SOURCE=SYSTEM
-DARROW_DEPENDENCY_USE_SHARED=${ARROW_DEPENDENCY_USE_SHARED}
-DARROW_PACKAGE_KIND=vcpkg
-DARROW_WITH_BROTLI=ON
-DARROW_WITH_BZ2=ON
-DARROW_WITH_LZ4=ON
-DARROW_WITH_SNAPPY=ON
-DARROW_WITH_ZLIB=ON
-DARROW_WITH_ZSTD=ON
-DBUILD_WARNING_LEVEL=PRODUCTION
-DCMAKE_SYSTEM_PROCESSOR=${VCPKG_TARGET_ARCHITECTURE}
-DZSTD_MSVC_LIB_PREFIX=
MAYBE_UNUSED_VARIABLES
ZSTD_MSVC_LIB_PREFIX
)

vcpkg_cmake_install()
vcpkg_copy_pdbs()

vcpkg_fixup_pkgconfig()

if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/arrow_static.lib")
message(FATAL_ERROR "Installed lib file should be named 'arrow.lib' via patching the upstream build.")
endif()

if("dataset" IN_LIST FEATURES)
vcpkg_cmake_config_fixup(
PACKAGE_NAME arrowdataset
CONFIG_PATH lib/cmake/ArrowDataset
DO_NOT_DELETE_PARENT_CONFIG_PATH
)
endif()

if("acero" IN_LIST FEATURES)
vcpkg_cmake_config_fixup(
PACKAGE_NAME arrowacero
CONFIG_PATH lib/cmake/ArrowAcero
DO_NOT_DELETE_PARENT_CONFIG_PATH
)
endif()

if("flight" IN_LIST FEATURES)
vcpkg_cmake_config_fixup(
PACKAGE_NAME ArrowFlight
CONFIG_PATH lib/cmake/ArrowFlight
DO_NOT_DELETE_PARENT_CONFIG_PATH
)
endif()

if("flightsql" IN_LIST FEATURES)
vcpkg_cmake_config_fixup(
PACKAGE_NAME ArrowFlightSql
CONFIG_PATH lib/cmake/ArrowFlightSql
DO_NOT_DELETE_PARENT_CONFIG_PATH
)
endif()

if("parquet" IN_LIST FEATURES)
vcpkg_cmake_config_fixup(
PACKAGE_NAME parquet
CONFIG_PATH lib/cmake/Parquet
DO_NOT_DELETE_PARENT_CONFIG_PATH
)
endif()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Arrow)

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
if("parquet" IN_LIST FEATURES)
file(READ "${CMAKE_CURRENT_LIST_DIR}/usage-parquet" usage-parquet)
file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage-parquet}")
endif()
if("dataset" IN_LIST FEATURES)
file(READ "${CMAKE_CURRENT_LIST_DIR}/usage-dataset" usage-dataset)
file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage-dataset}")
endif()
if("acero" IN_LIST FEATURES)
file(READ "${CMAKE_CURRENT_LIST_DIR}/usage-acero" usage-acero)
file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage-acero}")
endif()

if("flight" IN_LIST FEATURES)
file(READ "${CMAKE_CURRENT_LIST_DIR}/usage-flight" usage-flight)
file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage-flight}")
endif()

if("flightsql" IN_LIST FEATURES)
file(READ "${CMAKE_CURRENT_LIST_DIR}/usage-flightsql" usage-flightsql)
file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage-flightsql}")
endif()

if("example" IN_LIST FEATURES)
file(INSTALL "${SOURCE_PATH}/cpp/examples/minimal_build/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/example")
endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
22 changes: 22 additions & 0 deletions overlays/arrow/thrift.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/cpp/cmake_modules/FindThriftAlt.cmake b/cpp/cmake_modules/FindThriftAlt.cmake
index f3e4902..65ceac8 100644
--- a/cpp/cmake_modules/FindThriftAlt.cmake
+++ b/cpp/cmake_modules/FindThriftAlt.cmake
@@ -45,7 +45,7 @@ endif()
# * https://github.com/apache/thrift/pull/2725
# * https://github.com/apache/thrift/pull/2726
# * https://github.com/conda-forge/thrift-cpp-feedstock/issues/68
-if(NOT WIN32)
+
set(find_package_args "")
if(ThriftAlt_FIND_VERSION)
list(APPEND find_package_args ${ThriftAlt_FIND_VERSION})
@@ -61,7 +61,7 @@ if(NOT WIN32)
"${THRIFT_COMPILER}")
return()
endif()
-endif()
+

function(extract_thrift_version)
if(ThriftAlt_INCLUDE_DIR)
4 changes: 4 additions & 0 deletions overlays/arrow/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The package arrow provides CMake targets:

find_package(Arrow CONFIG REQUIRED)
target_link_libraries(main PRIVATE "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,Arrow::arrow_static,Arrow::arrow_shared>")
3 changes: 3 additions & 0 deletions overlays/arrow/usage-acero
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

find_package(ArrowAcero CONFIG REQUIRED)
target_link_libraries(main PRIVATE "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,ArrowAcero::arrow_acero_static,ArrowAcero::arrow_acero_shared>")
3 changes: 3 additions & 0 deletions overlays/arrow/usage-dataset
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

find_package(ArrowDataset CONFIG REQUIRED)
target_link_libraries(main PRIVATE "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,ArrowDataset::arrow_dataset_static,ArrowDataset::arrow_dataset_shared>")
3 changes: 3 additions & 0 deletions overlays/arrow/usage-flight
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

find_package(ArrowFlight CONFIG REQUIRED)
target_link_libraries(main PRIVATE "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,ArrowFlight::arrow_flight_static,ArrowFlight::arrow_flight_shared>")
3 changes: 3 additions & 0 deletions overlays/arrow/usage-flightsql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

find_package(ArrowFlightSql CONFIG REQUIRED)
target_link_libraries(main PRIVATE "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,ArrowFlightSql::arrow_flight_sql_static,ArrowFlightSql::arrow_flight_sql_shared>")
3 changes: 3 additions & 0 deletions overlays/arrow/usage-parquet
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

find_package(Parquet CONFIG REQUIRED)
target_link_libraries(main PRIVATE "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,Parquet::parquet_static,Parquet::parquet_shared>")
13 changes: 13 additions & 0 deletions overlays/arrow/utf8proc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/cpp/cmake_modules/Findutf8proc.cmake b/cpp/cmake_modules/Findutf8proc.cmake
index e347414..83f2aa1 100644
--- a/cpp/cmake_modules/Findutf8proc.cmake
+++ b/cpp/cmake_modules/Findutf8proc.cmake
@@ -30,7 +30,7 @@ if(ARROW_PACKAGE_KIND STREQUAL "vcpkg")
if(utf8proc_FIND_REQUIRED)
list(APPEND find_package_args REQUIRED)
endif()
- find_package(utf8proc NAMES unofficial-utf8proc ${find_package_args})
+ find_package(utf8proc NAMES unofficial-utf8proc)
if(utf8proc_FOUND)
add_library(utf8proc::utf8proc ALIAS utf8proc)
return()
Loading

0 comments on commit 78c0482

Please sign in to comment.